Class: Event

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/event.rb', line 3

def description
  @description
end

#inningObject

Returns the value of attribute inning.



3
4
5
# File 'lib/event.rb', line 3

def inning
  @inning
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/event.rb', line 3

def number
  @number
end

#teamObject

Returns the value of attribute team.



3
4
5
# File 'lib/event.rb', line 3

def team
  @team
end

Instance Method Details

#load(element, home_or_away) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/event.rb', line 5

def load(element, home_or_away)
	@xml_doc = element
	@team = home_or_away
  @number = element.attributes["number"]
  @inning = element.attributes["inning"]
  @description = element.attributes["description"]
end