Class: FootballApi::Card
- Inherits:
-
Object
- Object
- FootballApi::Card
- Defined in:
- lib/football_api/card.rb
Constant Summary collapse
- TYPE =
[ :yellow, :red ]
Instance Attribute Summary collapse
-
#minute ⇒ Object
Returns the value of attribute minute.
-
#player ⇒ Object
Returns the value of attribute player.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Card
constructor
A new instance of Card.
- #parse_player(hash = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#minute ⇒ Object
Returns the value of attribute minute.
5 6 7 |
# File 'lib/football_api/card.rb', line 5 def minute @minute end |
#player ⇒ Object
Returns the value of attribute player.
5 6 7 |
# File 'lib/football_api/card.rb', line 5 def player @player end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/football_api/card.rb', line 5 def type @type end |
Instance Method Details
#parse_player(hash = {}) ⇒ Object
15 16 17 |
# File 'lib/football_api/card.rb', line 15 def parse_player(hash = {}) FootballApi::Player.new(hash) end |