<% def flog_caracteristics(flog_score) if flog_score >= 0 and flog_score < 11 "title='Awesome'" elsif flog_score >= 11 and flog_score < 21 "title='Good enough'" elsif flog_score >= 21 and flog_score < 41 "style='background-color: #FFFF99; color: black;' title='Might need refactoring'" elsif flog_score >= 41 and flog_score < 61 "style='background-color: yellow; color: black;' title='Possible to justify'" elsif flog_score >= 61 and flog_score < 100 "style='background-color: orange; color: black;' title='Danger'" elsif flog_score >= 100 and flog_score < 200 "style='background-color: red; color: black;' title='Whoop, whoop, whoop'" elsif flog_score > 200 "style='background-color: black; color: white;' title='Someone please think of the children'" end end %>
Score: <%= score %>
<% scanned_methods.each do |sm| %>
>
<%= sm.name %> (<%= sm.score %>)
Score
Operator
<% def cycle(first_value, second_value, iteration) return first_value if iteration % 2 == 0 return second_value end sm.operators.each_with_index do |operator, count| %>
<%= sprintf("%0.2f", operator.score) %>
<%= operator.operator %>
<% end %>
<% end %>