lib/sportradar/api/soccer/match.rb in sportradar-api-0.1.3 vs lib/sportradar/api/soccer/match.rb in sportradar-api-0.1.4
- old
+ new
@@ -23,10 +23,10 @@
# Actual stats from match summary
@period = data["period"]
@clock = data["clock"]
@referee = OpenStruct.new data["referee"] if data["referee"]
- @facts = data["facts"]["fact"].map {|fact| OpenStruct.new fact } if data["facts"]
+ @facts = data["facts"]["fact"].map {|fact| Sportradar::Api::Soccer::Fact.new fact } if data["facts"]
@response = data
end
def period_name
period_names = {"P1" => "Period one", "H" => "Halftime", "P2" => "Period two", "PX1" => "Pre-extra time one", "X1" => "Extra time one", "PX2" => "Pre-extra time two", "X2" => "Extra time two", "PP" => "Pre-penalty", "P" => "Penalty"}