class SportsDataApi::Ncaafb::Drive
Attributes
actions[R]
clock[R]
id[R]
team[R]
type[R]
Public Class Methods
new(event_hash)
click to toggle source
# File lib/sports_data_api/ncaafb/drive.rb, line 6 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
Public Instance Methods
event_actions()
click to toggle source
# File lib/sports_data_api/ncaafb/drive.rb, line 18 def event_actions actions.select {|i| i.class == SportsDataApi::Nfl::EventAction } end
play_actions()
click to toggle source
# File lib/sports_data_api/ncaafb/drive.rb, line 14 def play_actions actions.select {|i| i.class == SportsDataApi::Nfl::PlayAction} end