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



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

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

Instance Method Details

#attributes_black_listObject



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

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

#attributes_black_list_add(*getters) ⇒ Object



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

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

#attributes_white_listObject



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

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

#attributes_white_list_add(*getters) ⇒ Object



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

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

#dirty_attributesObject



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

def dirty_attributes
  @dirty_attributes = true
end

#dirty_attributes?Boolean



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

def dirty_attributes?
  @dirty_attributes
end