Class: FootballApi::MatchStats
- Inherits:
-
Object
- Object
- FootballApi::MatchStats
- Defined in:
- lib/football_api/match_stats.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#local_team_stats ⇒ Object
Returns the value of attribute local_team_stats.
-
#visitor_team_stats ⇒ Object
Returns the value of attribute visitor_team_stats.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ MatchStats
constructor
A new instance of MatchStats.
Constructor Details
#initialize(hash = {}) ⇒ MatchStats
Returns a new instance of MatchStats.
5 6 7 8 9 |
# File 'lib/football_api/match_stats.rb', line 5 def initialize(hash = {}) @id = hash[:id] @local_team_stats = Stats.new(hash[:localteam]) @visitor_team_stats = Stats.new(hash[:visitorteam]) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/football_api/match_stats.rb', line 3 def id @id end |
#local_team_stats ⇒ Object
Returns the value of attribute local_team_stats.
3 4 5 |
# File 'lib/football_api/match_stats.rb', line 3 def local_team_stats @local_team_stats end |
#visitor_team_stats ⇒ Object
Returns the value of attribute visitor_team_stats.
3 4 5 |
# File 'lib/football_api/match_stats.rb', line 3 def visitor_team_stats @visitor_team_stats end |