Class: FootballApi::Player
- Inherits:
-
Object
- Object
- FootballApi::Player
- Defined in:
- lib/football_api/player.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#pos ⇒ Object
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(hash = {}) ⇒ Player
Returns a new instance of Player.
5 6 7 8 9 10 |
# File 'lib/football_api/player.rb', line 5 def initialize(hash = {}) @number = hash[:number] @name = hash[:name] @pos = hash[:pos] @id = hash[:id] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/football_api/player.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/football_api/player.rb', line 3 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/football_api/player.rb', line 3 def number @number end |
#pos ⇒ Object
Returns the value of attribute pos.
3 4 5 |
# File 'lib/football_api/player.rb', line 3 def pos @pos end |