Class: Coach

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

Overview

This class represents a single MLB coach

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#firstObject

Returns the value of attribute first.



4
5
6
# File 'lib/coach.rb', line 4

def first
  @first
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/coach.rb', line 4

def id
  @id
end

#lastObject

Returns the value of attribute last.



4
5
6
# File 'lib/coach.rb', line 4

def last
  @last
end

#numObject

Returns the value of attribute num.



4
5
6
# File 'lib/coach.rb', line 4

def num
  @num
end

#positionObject

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