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