Class: SportsDataApi::Nfl::Event

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clockObject (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_typeObject (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

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#sequenceObject (readonly)

Returns the value of attribute sequence.



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

def sequence
  @sequence
end

#summaryObject (readonly)

Returns the value of attribute summary.



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

def summary
  @summary
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#updatedObject (readonly)

Returns the value of attribute updated.



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

def updated
  @updated
end

#winnerObject (readonly)

Returns the value of attribute winner.



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

def winner
  @winner
end