Class: SportsDataApi::Nfl::Event
- Inherits:
-
Object
- Object
- SportsDataApi::Nfl::Event
- Defined in:
- lib/sports_data_api/nfl/event.rb
Instance Attribute Summary collapse
-
#clock ⇒ Object
readonly
Returns the value of attribute clock.
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#sequence ⇒ Object
readonly
Returns the value of attribute sequence.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
-
#winner ⇒ Object
readonly
Returns the value of attribute winner.
Instance Method Summary collapse
-
#initialize(event_hash) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(event_hash) ⇒ Event
Returns a new instance of Event.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sports_data_api/nfl/event.rb', line 6 def initialize(event_hash) @id = event_hash["id"] @sequence = event_hash["sequence"] @clock = event_hash["clock"] @type = event_hash["type"] @updated = event_hash["updated"] @summary = event_hash["summary"] @winner = event_hash["winner"] @event_type = event_hash["event_type"] end |
Instance Attribute Details
#clock ⇒ Object (readonly)
Returns the value of attribute clock.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def clock @clock end |
#event_type ⇒ Object (readonly)
Returns the value of attribute event_type.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def event_type @event_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def id @id end |
#sequence ⇒ Object (readonly)
Returns the value of attribute sequence.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def sequence @sequence end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def summary @summary end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def type @type end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def updated @updated end |
#winner ⇒ Object (readonly)
Returns the value of attribute winner.
4 5 6 |
# File 'lib/sports_data_api/nfl/event.rb', line 4 def winner @winner end |