Class: Chirp::PathProcessor
- Inherits:
-
Object
- Object
- Chirp::PathProcessor
- Defined in:
- lib/chirp/application.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(context, options = {}, &block) ⇒ PathProcessor
constructor
A new instance of PathProcessor.
Constructor Details
#initialize(context, options = {}, &block) ⇒ PathProcessor
Returns a new instance of PathProcessor.
55 56 57 58 59 |
# File 'lib/chirp/application.rb', line 55 def initialize(context, ={}, &block) @context = context @filter = PathFilter.new() @block = block end |
Instance Method Details
#execute ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'lib/chirp/application.rb', line 61 def execute @context.debug("PathProcessor execute for #{@context.path}") if @filter.passes?(@context.path) @context.execute(@block) else @context.debug("Filter blocked #{@context.path}") @context.debug("Filter: #{@filter}") end end |