Class: Qfill::Filter
- Inherits:
-
Object
- Object
- Qfill::Filter
- Defined in:
- lib/qfill/filter.rb
Instance Attribute Summary collapse
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#processor_arguments ⇒ Object
Returns the value of attribute processor_arguments.
Instance Method Summary collapse
-
#initialize(proc, *params) ⇒ Filter
constructor
A new instance of Filter.
- #run(*args) ⇒ Object
Constructor Details
#initialize(proc, *params) ⇒ Filter
Returns a new instance of Filter.
9 10 11 12 |
# File 'lib/qfill/filter.rb', line 9 def initialize(proc, *params) @processor = proc @processor_arguments = params end |
Instance Attribute Details
#processor ⇒ Object
Returns the value of attribute processor.
7 8 9 |
# File 'lib/qfill/filter.rb', line 7 def processor @processor end |
#processor_arguments ⇒ Object
Returns the value of attribute processor_arguments.
7 8 9 |
# File 'lib/qfill/filter.rb', line 7 def processor_arguments @processor_arguments end |
Instance Method Details
#run(*args) ⇒ Object
14 15 16 |
# File 'lib/qfill/filter.rb', line 14 def run(*args) self.processor.call(*args, *self.processor_arguments) end |