Class: FootballApi::MatchStats

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#local_team_statsObject

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_statsObject

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