Class: HabiticaClient::User::Stats
- Inherits:
-
Object
- Object
- HabiticaClient::User::Stats
- Extended by:
- Forwardable, Hashup
- Defined in:
- lib/habitica_client/user/stats.rb
Instance Attribute Summary collapse
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize(api_data) ⇒ Stats
constructor
A new instance of Stats.
Methods included from Hashup
Constructor Details
#initialize(api_data) ⇒ Stats
Returns a new instance of Stats.
30 31 32 33 |
# File 'lib/habitica_client/user/stats.rb', line 30 def initialize(api_data) api_data['player_class'] = api_data['class'] # 'class' is reserved @stats = OpenStruct.new(api_data) end |
Instance Attribute Details
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
17 18 19 |
# File 'lib/habitica_client/user/stats.rb', line 17 def stats @stats end |