Class: Diablo3Api::Player
- Inherits:
-
Object
- Object
- Diablo3Api::Player
- Includes:
- HTTParty
- Defined in:
- lib/diablo3_api/player.rb
Instance Attribute Summary collapse
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username) ⇒ Player
constructor
A new instance of Player.
- #profile ⇒ Object
Constructor Details
#initialize(username) ⇒ Player
Returns a new instance of Player.
12 13 14 |
# File 'lib/diablo3_api/player.rb', line 12 def initialize(username) self.username = username end |
Instance Attribute Details
#username ⇒ Object
Returns the value of attribute username.
7 8 9 |
# File 'lib/diablo3_api/player.rb', line 7 def username @username end |
Instance Method Details
#profile ⇒ Object
16 17 18 |
# File 'lib/diablo3_api/player.rb', line 16 def profile self.class.get "/profile/#{self.username}/" end |