Class: Calagator::DuplicateChecking::DuplicateFinder
- Inherits:
-
Struct
- Object
- Struct
- Calagator::DuplicateChecking::DuplicateFinder
- Defined in:
- lib/calagator/duplicate_checking/duplicate_finder.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#model ⇒ Object
Returns the value of attribute model.
Instance Method Summary collapse
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields
5 6 7 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 5 def fields @fields end |
#model ⇒ Object
Returns the value of attribute model
5 6 7 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 5 def model @model end |
Instance Method Details
#find ⇒ Object
6 7 8 9 10 11 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 6 def find scope = model.all scope = yield(scope) if block_given? scope = apply_query(scope) unless na? group_by_fields(scope.to_a) end |