Module: Sequencescape::Api::Resource::Groups::InstanceMethods

Defined in:
lib/sequencescape-api/resource/attribute_groups.rb

Instance Method Summary collapse

Instance Method Details

#attribute_groupsObject



5
6
7
# File 'lib/sequencescape-api/resource/attribute_groups.rb', line 5

def attribute_groups
  @attribute_groups ||= {}
end

#changed?Boolean

Returns:

  • (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_attributesObject



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

Returns:

  • (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