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.
11 12 13 14 |
# File 'lib/qfill/filter.rb', line 11 def initialize(proc, *params) @processor = proc @processor_arguments = params end |
Instance Attribute Details
#processor ⇒ Object
Returns the value of attribute processor.
9 10 11 |
# File 'lib/qfill/filter.rb', line 9 def processor @processor end |
#processor_arguments ⇒ Object
Returns the value of attribute processor_arguments.
9 10 11 |
# File 'lib/qfill/filter.rb', line 9 def processor_arguments @processor_arguments end |
Instance Method Details
#run(*args) ⇒ Object
16 17 18 |
# File 'lib/qfill/filter.rb', line 16 def run(*args) processor.call(*args, *processor_arguments) end |