Class: Coder::State
- Inherits:
-
Object
- Object
- Coder::State
- Defined in:
- lib/states/state.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(args) ⇒ State
constructor
A new instance of State.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ State
Returns a new instance of State.
5 6 7 8 |
# File 'lib/states/state.rb', line 5 def initialize(args) self.code = args[:code].to_s self.name = args[:name] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/states/state.rb', line 3 def code @code end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/states/state.rb', line 3 def name @name end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/states/state.rb', line 10 def to_s name end |