Class: Tenon::BaseFilterer

Inherits:
Object
  • Object
show all
Defined in:
lib/tenon/filterers/base_filterer.rb

Overview

Creates a base for building Tenon::<Model>Filterer classes.

Direct Known Subclasses

GenericFilterer

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'lib/tenon/filterers/base_filterer.rb', line 4

def params
  @params
end

#scopeObject (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

#filterObject



11
12
13
# File 'lib/tenon/filterers/base_filterer.rb', line 11

def filter
  scope
end