Class: FplGsheet::Player
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- FplGsheet::Player
- Defined in:
- lib/fpl_gsheet/player.rb
Overview
as in, football player, not an FPL manager
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(raw_hash, databank) ⇒ Player
constructor
attr_reader :details.
-
#price ⇒ Object
FPL stores £5.4m as 54, let’s change it back.
Constructor Details
#initialize(raw_hash, databank) ⇒ Player
attr_reader :details
7 8 9 10 |
# File 'lib/fpl_gsheet/player.rb', line 7 def initialize(raw_hash, databank) super(raw_hash) @databank = databank end |
Instance Method Details
#full_name ⇒ Object
12 13 14 |
# File 'lib/fpl_gsheet/player.rb', line 12 def full_name self.first_name + ' ' + self.second_name end |
#price ⇒ Object
FPL stores £5.4m as 54, let’s change it back
16 17 18 |
# File 'lib/fpl_gsheet/player.rb', line 16 def price # FPL stores £5.4m as 54, let's change it back (self.now_cost.to_f/10).round(1) end |