Class: ReplTalk::Board

Inherits:
Object
  • Object
show all
Defined in:
lib/repltalk/structures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#colorObject (readonly)

Returns the value of attribute color.



41
42
43
# File 'lib/repltalk/structures.rb', line 41

def color
  @color
end

#descriptionObject (readonly)

Returns the value of attribute description.



41
42
43
# File 'lib/repltalk/structures.rb', line 41

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



41
42
43
# File 'lib/repltalk/structures.rb', line 41

def id
  @id
end

#nameObject (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_sObject



50
51
52
# File 'lib/repltalk/structures.rb', line 50

def to_s
	@name
end