lib/sportradar/api/nfl/drive.rb in sportradar-api-0.1.30 vs lib/sportradar/api/nfl/drive.rb in sportradar-api-0.1.31

- old
+ new

@@ -28,9 +28,15 @@ if response["plays"]["play"].is_a?(Array) @plays = response["plays"]["play"].map {|play| Sportradar::Api::Nfl::Play.new play } elsif response["plays"]["play"].is_a?(Hash) @plays = [ Sportradar::Api::Nfl::Play.new(response["plays"]["play"]) ] end + elsif response["play"] + if response["play"].is_a?(Array) + @plays = response["play"].map {|play| Sportradar::Api::Nfl::Play.new play } + elsif response["play"].is_a?(Hash) + @plays = [ Sportradar::Api::Nfl::Play.new(response["play"]) ] + end end end end end