Class: Spoll::Models::Match
Instance Attribute Summary collapse
-
#away_team ⇒ Object
Returns the value of attribute away_team.
-
#events ⇒ Object
Returns the value of attribute events.
-
#home_team ⇒ Object
Returns the value of attribute home_team.
Instance Method Summary collapse
Methods inherited from Base
#set_array_relation, #set_relation
Instance Attribute Details
#away_team ⇒ Object
Returns the value of attribute away_team.
3 4 5 |
# File 'lib/spoll/models/match.rb', line 3 def away_team @away_team end |
#events ⇒ Object
Returns the value of attribute events.
3 4 5 |
# File 'lib/spoll/models/match.rb', line 3 def events @events end |
#home_team ⇒ Object
Returns the value of attribute home_team.
3 4 5 |
# File 'lib/spoll/models/match.rb', line 3 def home_team @home_team end |
Instance Method Details
#set_relations(response) ⇒ Object
10 11 12 13 14 |
# File 'lib/spoll/models/match.rb', line 10 def set_relations(response) set_array_relation(:events, response.events, 'match_id', :id) set_relation(:home_team, response.teams, 'id', :home_team_id) set_relation(:away_team, response.teams, 'id', :away_team_id) end |