Class: FootballApi::Event
- Inherits:
-
Object
- Object
- FootballApi::Event
- Defined in:
- lib/football_api/event.rb
Constant Summary collapse
- TYPES =
%w(yellowcard goal redcard yellowred)
Instance Attribute Summary collapse
-
#event_id ⇒ Object
Returns the value of attribute event_id.
-
#event_match_id ⇒ Object
Returns the value of attribute event_match_id.
-
#event_minute ⇒ Object
Returns the value of attribute event_minute.
-
#event_player ⇒ Object
Returns the value of attribute event_player.
-
#event_player_id ⇒ Object
Returns the value of attribute event_player_id.
-
#event_result ⇒ Object
Returns the value of attribute event_result.
-
#event_team ⇒ Object
Returns the value of attribute event_team.
-
#event_type ⇒ Object
Returns the value of attribute event_type.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(hash = {}) ⇒ Event
Returns a new instance of Event.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/football_api/event.rb', line 8 def initialize(hash = {}) @event_id = hash[:event_id] @event_match_id = hash[:event_match_id] @event_type = hash[:event_type] @event_minute = hash[:event_minute] @event_team = hash[:event_team] @event_player = hash[:event_player] @event_player_id = hash[:event_player_id] @event_result = hash[:event_result] end |
Instance Attribute Details
#event_id ⇒ Object
Returns the value of attribute event_id.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_id @event_id end |
#event_match_id ⇒ Object
Returns the value of attribute event_match_id.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_match_id @event_match_id end |
#event_minute ⇒ Object
Returns the value of attribute event_minute.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_minute @event_minute end |
#event_player ⇒ Object
Returns the value of attribute event_player.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_player @event_player end |
#event_player_id ⇒ Object
Returns the value of attribute event_player_id.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_player_id @event_player_id end |
#event_result ⇒ Object
Returns the value of attribute event_result.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_result @event_result end |
#event_team ⇒ Object
Returns the value of attribute event_team.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_team @event_team end |
#event_type ⇒ Object
Returns the value of attribute event_type.
5 6 7 |
# File 'lib/football_api/event.rb', line 5 def event_type @event_type end |