Class: Color

Inherits:
TypesafeEnum::Base
  • Object
show all
Defined in:
lib/software_challenge_client/color.rb

Overview

Die Spielsteinfarben. BLUE, YELLOW, RED und GREEN

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](digit) ⇒ Object



14
15
16
# File 'lib/software_challenge_client/color.rb', line 14

def [](digit)
  constants.find { |const| const_get(const) == digit }
end

Instance Method Details

#to_sObject

Gibt den color namen zurück



20
21
22
# File 'lib/software_challenge_client/color.rb', line 20

def to_s
  self.key.to_s
end