Class: FootballApi::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/football_api/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/football_api/player.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/football_api/player.rb', line 3

def name
  @name
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/football_api/player.rb', line 3

def number
  @number
end

#posObject

Returns the value of attribute pos.



3
4
5
# File 'lib/football_api/player.rb', line 3

def pos
  @pos
end