Class: SimpleFilter::Base
- Inherits:
-
Object
- Object
- SimpleFilter::Base
- Extended by:
- Filter
- Defined in:
- lib/simple_filter/base.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Attributes included from Filter
Instance Method Summary collapse
-
#initialize(params = {}, scope = nil) ⇒ Base
constructor
A new instance of Base.
- #scoping(scope) ⇒ Object
- #search ⇒ Object
Methods included from Filter
Constructor Details
#initialize(params = {}, scope = nil) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/simple_filter/base.rb', line 7 def initialize(params = {}, scope = nil) @params = params @scope = scope end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/simple_filter/base.rb', line 5 def params @params end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
5 6 7 |
# File 'lib/simple_filter/base.rb', line 5 def scope @scope end |
Instance Method Details
#scoping(scope) ⇒ Object
12 13 14 15 16 |
# File 'lib/simple_filter/base.rb', line 12 def scoping(scope) @scope = scope self end |
#search ⇒ Object
18 19 20 |
# File 'lib/simple_filter/base.rb', line 18 def search conditions.scope end |