Class: Infostrada::MatchEvent
- Inherits:
-
Object
- Object
- Infostrada::MatchEvent
- Defined in:
- lib/infostrada/match_event.rb
Instance Attribute Summary collapse
-
#away_goals ⇒ Object
Returns the value of attribute away_goals.
-
#description ⇒ Object
Returns the value of attribute description.
-
#home_event ⇒ Object
Returns the value of attribute home_event.
-
#home_goals ⇒ Object
Returns the value of attribute home_goals.
-
#id ⇒ Object
Returns the value of attribute id.
-
#info ⇒ Object
Returns the value of attribute info.
-
#minute ⇒ Object
Returns the value of attribute minute.
-
#period ⇒ Object
Returns the value of attribute period.
-
#period_short ⇒ Object
Returns the value of attribute period_short.
-
#person2_id ⇒ Object
Returns the value of attribute person2_id.
-
#person2_name ⇒ Object
Returns the value of attribute person2_name.
-
#person2_short_name ⇒ Object
Returns the value of attribute person2_short_name.
-
#person_id ⇒ Object
Returns the value of attribute person_id.
-
#person_name ⇒ Object
Returns the value of attribute person_name.
-
#person_short_name ⇒ Object
Returns the value of attribute person_short_name.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#short_description ⇒ Object
Returns the value of attribute short_description.
-
#team_id ⇒ Object
Returns the value of attribute team_id.
-
#team_name ⇒ Object
Returns the value of attribute team_name.
-
#team_short_name ⇒ Object
Returns the value of attribute team_short_name.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(hash) ⇒ MatchEvent
constructor
A new instance of MatchEvent.
Constructor Details
#initialize(hash) ⇒ MatchEvent
Returns a new instance of MatchEvent.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/infostrada/match_event.rb', line 8 def initialize(hash) @id = hash['n_ActionID'] @description = hash['c_Action'] @short_description = hash['c_ActionShort'] @period = hash['c_Period'] @period_short = hash['c_PeriodShort'] @time = hash['n_ActionTime'] @home_goals = hash['n_HomeGoals'] @away_goals = hash['n_AwayGoals'] @home_event = (hash['n_HomeOrAway'] == 1) ? true : false @team_id = hash['n_TeamID'] @team_name = hash['c_Team'] @team_short_name = hash['c_TeamShort'] @person_id = hash['n_PersonID'] @person_name = hash['c_Person'] @person_short_name = hash['c_PersonShort'] @reason = hash['c_ActionReason'] @info = hash['c_ActionInfo'] @person2_id = hash['n_SubPersonID'] @person2_name = hash['c_SubPerson'] @person2_short_name = hash['c_SubPersonShort'] @minute = hash['c_ActionMinute'] self end |
Instance Attribute Details
#away_goals ⇒ Object
Returns the value of attribute away_goals.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def away_goals @away_goals end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def description @description end |
#home_event ⇒ Object
Returns the value of attribute home_event.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def home_event @home_event end |
#home_goals ⇒ Object
Returns the value of attribute home_goals.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def home_goals @home_goals end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def id @id end |
#info ⇒ Object
Returns the value of attribute info.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def info @info end |
#minute ⇒ Object
Returns the value of attribute minute.
6 7 8 |
# File 'lib/infostrada/match_event.rb', line 6 def minute @minute end |
#period ⇒ Object
Returns the value of attribute period.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def period @period end |
#period_short ⇒ Object
Returns the value of attribute period_short.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def period_short @period_short end |
#person2_id ⇒ Object
Returns the value of attribute person2_id.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def person2_id @person2_id end |
#person2_name ⇒ Object
Returns the value of attribute person2_name.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def person2_name @person2_name end |
#person2_short_name ⇒ Object
Returns the value of attribute person2_short_name.
6 7 8 |
# File 'lib/infostrada/match_event.rb', line 6 def person2_short_name @person2_short_name end |
#person_id ⇒ Object
Returns the value of attribute person_id.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def person_id @person_id end |
#person_name ⇒ Object
Returns the value of attribute person_name.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def person_name @person_name end |
#person_short_name ⇒ Object
Returns the value of attribute person_short_name.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def person_short_name @person_short_name end |
#reason ⇒ Object
Returns the value of attribute reason.
5 6 7 |
# File 'lib/infostrada/match_event.rb', line 5 def reason @reason end |
#short_description ⇒ Object
Returns the value of attribute short_description.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def short_description @short_description end |
#team_id ⇒ Object
Returns the value of attribute team_id.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def team_id @team_id end |
#team_name ⇒ Object
Returns the value of attribute team_name.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def team_name @team_name end |
#team_short_name ⇒ Object
Returns the value of attribute team_short_name.
4 5 6 |
# File 'lib/infostrada/match_event.rb', line 4 def team_short_name @team_short_name end |
#time ⇒ Object
Returns the value of attribute time.
3 4 5 |
# File 'lib/infostrada/match_event.rb', line 3 def time @time end |