Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/cc.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_s_colorObject



125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/minitest/cc.rb', line 125

def to_s_color
  case self
  when 1.0..33.0
    to_s.red
  when 33.1..66.0
    to_s.yellow
  when 66.1..100.0
    to_s.green
  else
    to_s
  end
end