Module: Sequencescape::Api::Resource::Groups::InstanceMethods
- Defined in:
- lib/sequencescape-api/resource/attribute_groups.rb
Instance Method Summary collapse
- #attribute_groups ⇒ Object
- #changed? ⇒ Boolean
- #clear_changed_attributes ⇒ Object
- #eager_loaded_attribute?(name) ⇒ Boolean
Instance Method Details
#attribute_groups ⇒ Object
5 6 7 |
# File 'lib/sequencescape-api/resource/attribute_groups.rb', line 5 def attribute_groups @attribute_groups ||= {} end |
#changed? ⇒ Boolean
16 17 18 |
# File 'lib/sequencescape-api/resource/attribute_groups.rb', line 16 def changed? super or attribute_groups.values.any?(&:changed?) end |
#clear_changed_attributes ⇒ Object
20 21 22 23 |
# File 'lib/sequencescape-api/resource/attribute_groups.rb', line 20 def clear_changed_attributes super attribute_groups.values.map(&:clear_changed_attributes) end |
#eager_loaded_attribute?(name) ⇒ Boolean
25 26 27 |
# File 'lib/sequencescape-api/resource/attribute_groups.rb', line 25 def eager_loaded_attribute?(name) super or attribute_groups.key?(name.to_sym) end |