Module: SmoothOperator::AttributeAssignment::ClassMethods
- Defined in:
- lib/smooth_operator/attribute_assignment.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #attributes_black_list ⇒ Object
- #attributes_black_list_add(*getters) ⇒ Object
- #attributes_white_list ⇒ Object
- #attributes_white_list_add(*getters) ⇒ Object
- #dirty_attributes ⇒ Object
- #dirty_attributes? ⇒ Boolean
Instance Attribute Details
#unknown_hash_class ⇒ Object
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_list ⇒ Object
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_list ⇒ Object
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_attributes ⇒ Object
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 |