Module: HealthGraph::Model
- Includes:
- API
- Included in:
- FitnessActivitiesFeed, FitnessActivitiesFeed::Item, FitnessActivityDelete, FitnessActivityUpdate, NewFitnessActivity, Profile, Settings, SleepFeed, SleepFeed::Item, StrengthTrainingActivitiesFeed, StrengthTrainingActivitiesFeed::Item, StrengthTrainingActivity, User, WeightFeed, WeightFeed::Item
- Defined in:
- lib/health_graph/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Attributes included from API
Class Method Summary collapse
Instance Method Summary collapse
Methods included from API
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/health_graph/model.rb', line 5 def body @body end |
Class Method Details
.included(includer) ⇒ Object
7 8 9 |
# File 'lib/health_graph/model.rb', line 7 def self.included(includer) includer.extend ClassMethods end |
Instance Method Details
#populate_from_hash!(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/health_graph/model.rb', line 28 def populate_from_hash!(hash) return unless hash hash.each do |key, value| set_attr_method = "#{key}=" unless value.nil? if respond_to?(set_attr_method) self.__send__(set_attr_method, value) end end end end |