Class: Yuriita::ExpressionFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/yuriita/expression_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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