Sha256: 0721237e27258fc00a90f063f0c176ce05599650b63c198de25055fa0d48d101
Contents?: true
Size: 580 Bytes
Versions: 14
Compression:
Stored size: 580 Bytes
Contents
module SportsDataApi module Nfl class Drive attr_reader :id, :clock, :type, :team, :actions def initialize(event_hash) @id = event_hash["id"] @clock = event_hash["clock"] @type = event_hash["type"] @team= event_hash["team"] @actions = Actions.build_actions(event_hash["actions"]) end def play_actions actions.select {|i| i.class == SportsDataApi::Nfl::PlayAction} end def event_actions actions.select {|i| i.class == SportsDataApi::Nfl::EventAction } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems