web/app/helpers/compare_helper.rb
changeset 106 eac4098d544d
parent 95 5336c148406a
child 111 28dccacb2bc1
equal deleted inserted replaced
105:8293977e9a30 106:eac4098d544d
     1 module CompareHelper
     1 module CompareHelper
     2 
     2 
     3   def comparing_impls_headline(impls)
     3   def comparing_runtimes_headline(runtimes)
     4     if impls.empty?
     4     if runtimes.empty?
     5       "Nothing to compare"
     5       "Nothing to compare"
     6     elsif impls.size == 1
     6     elsif runtimes.size == 1
     7       "Showing #{impls.first.name}"
     7       "Showing #{runtimes.first.name}"
     8     else
     8     else
     9       "Comparing #{impls.map(&:name)[0..-2].join(", ")} and #{impls[-1].name}"
     9       "Comparing #{runtimes.map(&:name)[0..-2].join(", ")} and #{runtimes[-1].name}"
    10     end
    10     end
    11   end
    11   end
    12 
    12 
    13 end
    13 end