Method: Fat::Color#decode

Defined in:
lib/fat/color.rb

#decode(code) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/fat/color.rb', line 33

def decode code
  case code
    when Fit::Fixture::RED then 'red'
    when Fit::Fixture::GREEN then 'green'
    when Fit::Fixture::YELLOW then 'yellow'
    when Fit::Fixture::GRAY then 'gray'
    when '#808080' then 'gray'
    else code
  end
end