Module: SmoothOperator::AttributeAssignment::ClassMethods

Defined in:
lib/smooth_operator/attribute_assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#unknown_hash_classObject



17
18
19
# File 'lib/smooth_operator/attribute_assignment.rb', line 17

def unknown_hash_class
  Helpers.get_instance_variable(self, :unknown_hash_class, ::OpenStruct)
end

Instance Method Details

#attributes_black_listObject



25
26
27
# File 'lib/smooth_operator/attribute_assignment.rb', line 25

def attributes_black_list
  Helpers.get_instance_variable(self, :attributes_black_list, Set.new)
end

#attributes_black_list_add(*getters) ⇒ Object



33
34
35
# File 'lib/smooth_operator/attribute_assignment.rb', line 33

def attributes_black_list_add(*getters)
  attributes_black_list.merge getters.map(&:to_s)
end

#attributes_white_listObject



21
22
23
# File 'lib/smooth_operator/attribute_assignment.rb', line 21

def attributes_white_list
  Helpers.get_instance_variable(self, :attributes_white_list, Set.new)
end

#attributes_white_list_add(*getters) ⇒ Object



29
30
31
# File 'lib/smooth_operator/attribute_assignment.rb', line 29

def attributes_white_list_add(*getters)
  attributes_white_list.merge getters.map(&:to_s)
end

#dirty_attributesObject



37
38
39
# File 'lib/smooth_operator/attribute_assignment.rb', line 37

def dirty_attributes
  @dirty_attributes = true
end

#dirty_attributes?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/smooth_operator/attribute_assignment.rb', line 41

def dirty_attributes?
  @dirty_attributes
end