Class: Yuriita::DynamicFilter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(qualifier:, &block) ⇒ DynamicFilter

Returns a new instance of DynamicFilter.



5
6
7
8
# File 'lib/yuriita/dynamic_filter.rb', line 5

def initialize(qualifier:, &block)
  @qualifier = qualifier
  @block = block
end

Instance Attribute Details

#qualifierObject (readonly)

Returns the value of attribute qualifier.



3
4
5
# File 'lib/yuriita/dynamic_filter.rb', line 3

def qualifier
  @qualifier
end

Instance Method Details

#apply(relation, input) ⇒ Object



10
11
12
# File 'lib/yuriita/dynamic_filter.rb', line 10

def apply(relation, input)
  block.call(relation, input)
end