Class: HealthGraph::Settings
- Inherits:
-
Object
- Object
- HealthGraph::Settings
- Includes:
- Model
- Defined in:
- lib/health_graph/models/settings.rb
Instance Attribute Summary
Attributes included from Model
Attributes included from API
Instance Method Summary collapse
- #elite? ⇒ Boolean
-
#initialize(access_token, path) ⇒ Settings
constructor
A new instance of Settings.
Methods included from Model
included, #populate_from_hash!
Methods included from API
Constructor Details
#initialize(access_token, path) ⇒ Settings
Returns a new instance of Settings.
7 8 9 10 11 12 |
# File 'lib/health_graph/models/settings.rb', line 7 def initialize(access_token, path) self.access_token = access_token response = get path, HealthGraph.accept_headers[:settings] self.body = response.body populate_from_hash! self.body end |
Instance Method Details
#elite? ⇒ Boolean
14 15 16 |
# File 'lib/health_graph/models/settings.rb', line 14 def elite? self.body["elite"] == "true" end |