Class: MightyGrid::Filters::CustomFilter
- Defined in:
- lib/mighty_grid/filters/custom_filter.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Attributes inherited from Base
#attribute, #default, #model, #options, #search_value
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ CustomFilter
constructor
A new instance of CustomFilter.
Constructor Details
#initialize(options = {}, &block) ⇒ CustomFilter
Returns a new instance of CustomFilter.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mighty_grid/filters/custom_filter.rb', line 6 def initialize( = {}, &block) self.class..merge!(scope: nil) super() if block_given? @scope = block else @scope = @options.delete(:scope) end end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
4 5 6 |
# File 'lib/mighty_grid/filters/custom_filter.rb', line 4 def scope @scope end |