Class: FortniteApi::Player
- Inherits:
-
Object
- Object
- FortniteApi::Player
- Defined in:
- lib/fortnite_api/player.rb
Instance Attribute Summary collapse
-
#epicuserhandle ⇒ Object
readonly
Returns the value of attribute epicuserhandle.
-
#lifetimestats ⇒ Object
readonly
Returns the value of attribute lifetimestats.
-
#platformnamelong ⇒ Object
readonly
Returns the value of attribute platformnamelong.
-
#recentmatches ⇒ Object
readonly
Returns the value of attribute recentmatches.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
- #currentduo ⇒ Object
- #currentsolo ⇒ Object
- #currentsquad ⇒ Object
- #globalduo ⇒ Object
- #globalsolo ⇒ Object
- #globalsquad ⇒ Object
-
#initialize(opts = {}) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(opts = {}) ⇒ Player
Returns a new instance of Player.
5 6 7 |
# File 'lib/fortnite_api/player.rb', line 5 def initialize(opts={}) opts.each { |k,v| instance_variable_set("@#{k.downcase}", v) } end |
Instance Attribute Details
#epicuserhandle ⇒ Object (readonly)
Returns the value of attribute epicuserhandle.
3 4 5 |
# File 'lib/fortnite_api/player.rb', line 3 def epicuserhandle @epicuserhandle end |
#lifetimestats ⇒ Object (readonly)
Returns the value of attribute lifetimestats.
3 4 5 |
# File 'lib/fortnite_api/player.rb', line 3 def lifetimestats @lifetimestats end |
#platformnamelong ⇒ Object (readonly)
Returns the value of attribute platformnamelong.
3 4 5 |
# File 'lib/fortnite_api/player.rb', line 3 def platformnamelong @platformnamelong end |
#recentmatches ⇒ Object (readonly)
Returns the value of attribute recentmatches.
3 4 5 |
# File 'lib/fortnite_api/player.rb', line 3 def recentmatches @recentmatches end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
3 4 5 |
# File 'lib/fortnite_api/player.rb', line 3 def stats @stats end |
Instance Method Details
#currentduo ⇒ Object
25 26 27 |
# File 'lib/fortnite_api/player.rb', line 25 def currentduo CurrentDuo.new(self.stats) end |
#currentsolo ⇒ Object
21 22 23 |
# File 'lib/fortnite_api/player.rb', line 21 def currentsolo CurrentSolo.new(self.stats) end |
#currentsquad ⇒ Object
29 30 31 |
# File 'lib/fortnite_api/player.rb', line 29 def currentsquad CurrentSquad.new(self.stats) end |
#globalduo ⇒ Object
13 14 15 |
# File 'lib/fortnite_api/player.rb', line 13 def globalduo GlobalDuo.new(self.stats) end |
#globalsolo ⇒ Object
9 10 11 |
# File 'lib/fortnite_api/player.rb', line 9 def globalsolo GlobalSolo.new(self.stats) end |
#globalsquad ⇒ Object
17 18 19 |
# File 'lib/fortnite_api/player.rb', line 17 def globalsquad GlobalSquad.new(self.stats) end |