Class: Sportradar::Api::Basketball::EndPeriod
- Inherits:
-
Play::Base
show all
- Defined in:
- lib/sportradar/api/basketball/plays/end_period.rb
Instance Attribute Summary
Attributes inherited from Play::Base
#clock, #description, #event_type, #game_seconds, #half, #id, #identifier, #location, #on_court, #on_court_ids, #player_id, #possession, #quarter, #response, #score, #statistics, #team_id, #updated
Instance Method Summary
collapse
Methods inherited from Play::Base
#==, #base_key, #clock_seconds, #handle_on_court, #handle_time, #initialize, #media_timeout?, #nba_game_seconds, #parse_statistics, #period, #points, #scoring_play?, #timeout?, #update
Methods inherited from Data
#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data
Instance Method Details
#display_type ⇒ Object
5
6
7
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 5
def display_type
''
end
|
#end_of_ot? ⇒ Boolean
19
20
21
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 19
def end_of_ot?
description.start_with?("End of ") && description.end_with?(" OT.")
end
|
#end_of_period? ⇒ Boolean
9
10
11
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 9
def end_of_period?
true
end
|
#end_of_regulation? ⇒ Boolean
16
17
18
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 16
def end_of_regulation?
description == "End of 4th Quarter." || description == "End of 2nd Half."
end
|
#halftime? ⇒ Boolean
22
23
24
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 22
def halftime?
description == 'End of 1st Half.'
end
|
#quarter_break? ⇒ Boolean
13
14
15
|
# File 'lib/sportradar/api/basketball/plays/end_period.rb', line 13
def quarter_break?
["End of 1st Quarter.", "End of 3rd Quarter."].include? description
end
|