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
3 4 5 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 3 def fields @fields end |
#model ⇒ Object
Returns the value of attribute model
3 4 5 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 3 def model @model end |
Instance Method Details
#find ⇒ Object
4 5 6 7 8 9 |
# File 'lib/calagator/duplicate_checking/duplicate_finder.rb', line 4 def find scope = model.all scope = yield(scope) if block_given? scope = apply_query(scope) unless na? group_by_fields(scope.to_a) end |