Class: Statium::Opta::Model::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/statium/opta/model/match.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Match

Returns a new instance of Match



16
17
18
19
# File 'lib/statium/opta/model/match.rb', line 16

def initialize(params)
  @matchInfo = MatchInfo.new(params['matchInfo'])
  @liveData = LiveData.new(params['liveData'])
end

Instance Attribute Details

#liveDataObject

Returns the value of attribute liveData



5
6
7
# File 'lib/statium/opta/model/match.rb', line 5

def liveData
  @liveData
end

#matchInfoObject

Returns the value of attribute matchInfo



6
7
8
# File 'lib/statium/opta/model/match.rb', line 6

def matchInfo
  @matchInfo
end

Class Method Details

.build(params) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/statium/opta/model/match.rb', line 8

def self.build params
  all_matches = []
  params["match"].each do |match_params|
    all_matches << Match.new(match_params)
  end
  all_matches
end