Method: Datamappify::Lazy::AttributesHandler#attributes_from_same_source

Defined in:
lib/datamappify/lazy/attributes_handler.rb

#attributes_from_same_source(name) ⇒ Set<Data::Mapper::Attribute> (private)

Parameters:

  • name (Symbol)

Returns:



84
85
86
87
88
89
90
91
92
# File 'lib/datamappify/lazy/attributes_handler.rb', line 84

def attributes_from_same_source(name)
  source_class_name = attribute_by_name(name).source_class_name

  attributes = all_attributes.select do |attribute|
    attribute.source_class_name == source_class_name
  end

  Set.new(attributes)
end