Module: Foobara::Entity::Concerns::Mutations

Includes:
Concern
Included in:
Foobara::Entity
Defined in:
foobara-0.0.110/projects/entity/src/concerns/mutations.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Instance Method Details

#update(new_attributes) ⇒ Object



12
13
14
15
16
# File 'foobara-0.0.110/projects/entity/src/concerns/mutations.rb', line 12

def update(new_attributes)
  new_attributes.each_pair do |attribute_name, value|
    write_attribute(attribute_name, value)
  end
end

#update_aggregate(value, type = self.class.model_type) ⇒ Object



7
8
9
10
# File 'foobara-0.0.110/projects/entity/src/concerns/mutations.rb', line 7

def update_aggregate(value, type = self.class.model_type)
  # is this a smell?
  self.class.update_aggregate(self, value, type)
end