Class: SportsDataApi::Nfl::Quarter

Inherits:
Object
  • Object
show all
Defined in:
lib/sports_data_api/nfl/quarter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(quarter_hash) ⇒ Quarter

Returns a new instance of Quarter.



6
7
8
9
# File 'lib/sports_data_api/nfl/quarter.rb', line 6

def initialize(quarter_hash)
  @number = quarter_hash["number"]
  @play_by_plays = PlayByPlays.new(quarter_hash["pbp"])
end

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



4
5
6
# File 'lib/sports_data_api/nfl/quarter.rb', line 4

def number
  @number
end

#play_by_playsObject (readonly)

Returns the value of attribute play_by_plays.



4
5
6
# File 'lib/sports_data_api/nfl/quarter.rb', line 4

def play_by_plays
  @play_by_plays
end