Class: Iqvoc::Origin::Filters::GenericFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/iqvoc/origin.rb

Instance Method Summary collapse

Instance Method Details

#call(obj, str) ⇒ Object



39
40
41
42
43
# File 'lib/iqvoc/origin.rb', line 39

def call(obj, str)
  # do what has to be done with str
  # afterwards: make sure to pass "obj" and your modified "str" to "run()"
  run(obj, str)
end

#run(obj, str) ⇒ Object



45
46
47
48
49
# File 'lib/iqvoc/origin.rb', line 45

def run(obj, str)
  obj.tap do |obj|
    obj.value = str
  end
end