Class: ReplTalk::Board
- Inherits:
-
Object
- Object
- ReplTalk::Board
- Defined in:
- lib/repltalk/structures.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(board) ⇒ Board
constructor
A new instance of Board.
- #to_s ⇒ Object
Constructor Details
#initialize(board) ⇒ Board
Returns a new instance of Board.
43 44 45 46 47 48 |
# File 'lib/repltalk/structures.rb', line 43 def initialize(board) @id = board["id"] @name = board["name"] @color = board["color"] @description = board["description"] end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
41 42 43 |
# File 'lib/repltalk/structures.rb', line 41 def color @color end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
41 42 43 |
# File 'lib/repltalk/structures.rb', line 41 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
41 42 43 |
# File 'lib/repltalk/structures.rb', line 41 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41 42 43 |
# File 'lib/repltalk/structures.rb', line 41 def name @name end |
Instance Method Details
#to_s ⇒ Object
50 51 52 |
# File 'lib/repltalk/structures.rb', line 50 def to_s @name end |