Class: Coach
- Inherits:
-
Object
- Object
- Coach
- Defined in:
- lib/coach.rb
Overview
This class represents a single MLB coach
Instance Attribute Summary collapse
-
#first ⇒ Object
Returns the value of attribute first.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last ⇒ Object
Returns the value of attribute last.
-
#num ⇒ Object
Returns the value of attribute num.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
Instance Attribute Details
#first ⇒ Object
Returns the value of attribute first.
4 5 6 |
# File 'lib/coach.rb', line 4 def first @first end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/coach.rb', line 4 def id @id end |
#last ⇒ Object
Returns the value of attribute last.
4 5 6 |
# File 'lib/coach.rb', line 4 def last @last end |
#num ⇒ Object
Returns the value of attribute num.
4 5 6 |
# File 'lib/coach.rb', line 4 def num @num end |
#position ⇒ Object
Returns the value of attribute position.
4 5 6 |
# File 'lib/coach.rb', line 4 def position @position end |
Instance Method Details
#init(element) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/coach.rb', line 7 def init(element) self.id = element.attributes['id'] self.first = element.attributes['first'] self.last = element.attributes['last'] self.num= element.attributes['num'] self.position = element.attributes['position'] end |