Class: FootballApi::MatchBench

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ MatchBench

Returns a new instance of MatchBench.



6
7
8
9
10
# File 'lib/football_api/match_bench.rb', line 6

def initialize(hash = {})
  @match_id     = hash[:match_id]
  @local_team   = Bench.new(hash, :localteam)
  @visitor_team = Bench.new(hash, :visitorteam)
end

Instance Attribute Details

#local_teamObject

Returns the value of attribute local_team.



4
5
6
# File 'lib/football_api/match_bench.rb', line 4

def local_team
  @local_team
end

#match_idObject

Returns the value of attribute match_id.



4
5
6
# File 'lib/football_api/match_bench.rb', line 4

def match_id
  @match_id
end

#visitor_teamObject

Returns the value of attribute visitor_team.



4
5
6
# File 'lib/football_api/match_bench.rb', line 4

def visitor_team
  @visitor_team
end