Class: Tenon::BaseFilterer
- Inherits:
-
Object
- Object
- Tenon::BaseFilterer
- Defined in:
- lib/tenon/filterers/base_filterer.rb
Overview
Creates a base for building Tenon::<Model>Filterer classes.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #filter ⇒ Object
-
#initialize(scope, params) ⇒ BaseFilterer
constructor
A new instance of BaseFilterer.
Constructor Details
#initialize(scope, params) ⇒ BaseFilterer
Returns a new instance of BaseFilterer.
6 7 8 9 |
# File 'lib/tenon/filterers/base_filterer.rb', line 6 def initialize(scope, params) @scope = scope @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/tenon/filterers/base_filterer.rb', line 4 def params @params end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
3 4 5 |
# File 'lib/tenon/filterers/base_filterer.rb', line 3 def scope @scope end |
Instance Method Details
#filter ⇒ Object
11 12 13 |
# File 'lib/tenon/filterers/base_filterer.rb', line 11 def filter scope end |