Class: AbstractFinder
- Inherits:
-
BaseFinder
- Object
- BaseFinder
- AbstractFinder
- Defined in:
- lib/abstract_finder.rb
Overview
AbstractFinder
Constant Summary collapse
- SORT =
%w[asc desc].freeze
Constants inherited from BaseFinder
Instance Attribute Summary collapse
-
#associations ⇒ Object
readonly
Returns the value of attribute associations.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Attributes inherited from BaseFinder
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model, associations, args) ⇒ AbstractFinder
constructor
rubocop:disable Lint/MissingSuper.
Methods inherited from BaseFinder
#meta, #page, #per_page, #total
Constructor Details
#initialize(model, associations, args) ⇒ AbstractFinder
rubocop:disable Lint/MissingSuper
13 14 15 16 17 |
# File 'lib/abstract_finder.rb', line 13 def initialize(model, associations, args) # rubocop:disable Lint/MissingSuper @model = model @associations = associations @filters = args end |
Instance Attribute Details
#associations ⇒ Object (readonly)
Returns the value of attribute associations.
5 6 7 |
# File 'lib/abstract_finder.rb', line 5 def associations @associations end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/abstract_finder.rb', line 5 def model @model end |
Class Method Details
.call(model, associations = [], args = []) ⇒ Object
9 10 11 |
# File 'lib/abstract_finder.rb', line 9 def self.call(model, associations = [], args = []) new(model, associations, args).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/abstract_finder.rb', line 19 def call load_collection self end |