Class: Yuriita::ExpressionFilter
- Inherits:
-
Object
- Object
- Yuriita::ExpressionFilter
- Defined in:
- lib/yuriita/expression_filter.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
- #apply(relation) ⇒ Object
-
#initialize(input:, &block) ⇒ ExpressionFilter
constructor
A new instance of ExpressionFilter.
Constructor Details
#initialize(input:, &block) ⇒ ExpressionFilter
Returns a new instance of ExpressionFilter.
5 6 7 8 |
# File 'lib/yuriita/expression_filter.rb', line 5 def initialize(input:, &block) @input = input @block = block end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
3 4 5 |
# File 'lib/yuriita/expression_filter.rb', line 3 def input @input end |
Instance Method Details
#apply(relation) ⇒ Object
10 11 12 |
# File 'lib/yuriita/expression_filter.rb', line 10 def apply(relation) block.call(relation) end |