Class: Datamappify::Repository::QueryMethod::FindMultiple

Inherits:
Method
  • Object
show all
Defined in:
lib/datamappify/repository/query_method/find_multiple.rb

Instance Attribute Summary

Attributes inherited from Method

#data_mapper, #states

Instance Method Summary collapse

Methods inherited from Method

#attributes_walker, #dirty_aware?, #dispatch_criteria_to_default_source, #dispatch_criteria_to_providers, #source_attributes_walker, #writer?

Constructor Details

#initialize(options, criteria) ⇒ FindMultiple

Returns a new instance of FindMultiple.

Parameters:

  • where (Hash)

    a hash containing all the find criterias

  • options (Hash)

    a hash containing required items like data_mapper and states



9
10
11
12
# File 'lib/datamappify/repository/query_method/find_multiple.rb', line 9

def initialize(options, criteria)
  super
  @criteria = criteria
end

Instance Method Details

#performArray<Entity>

Returns:



15
16
17
18
19
# File 'lib/datamappify/repository/query_method/find_multiple.rb', line 15

def perform
  dispatch_criteria_to_default_source(
    :FindMultiple, data_mapper.entity_class, @criteria, data_mapper.attributes
  )
end

#reader?Boolean

Returns:

  • (Boolean)

See Also:



22
23
24
# File 'lib/datamappify/repository/query_method/find_multiple.rb', line 22

def reader?
  true
end