Class: SGF::Model::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/sgf/model/label.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(position, text) ⇒ Label

Returns a new instance of Label.



4
5
6
7
# File 'lib/sgf/model/label.rb', line 4

def initialize position, text
  self.position = position
  self.text     = text
end

Instance Attribute Details

#positionObject

Returns the value of attribute position.



2
3
4
# File 'lib/sgf/model/label.rb', line 2

def position
  @position
end

#textObject

Returns the value of attribute text.



2
3
4
# File 'lib/sgf/model/label.rb', line 2

def text
  @text
end

Instance Method Details

#==(other) ⇒ Object



9
10
11
# File 'lib/sgf/model/label.rb', line 9

def == other
  self.position == other.position and self.text == other.text
end