class Stove::Filter
Attributes
block[R]
The block captured by the filter.
@return [Proc]
klass[R]
The class that created this filter.
@return [~Plugin::Base]
message[R]
The message given by the filter.
@return [String]
Public Class Methods
new(klass, message, &block)
click to toggle source
Create a new filter object.
@param [~Plugin::Base] klass
the class that created this filter
@param [String] message
the message given by the filter
@param [Proc] block
the block captured by this filter
# File lib/stove/filter.rb, line 36 def initialize(klass, message, &block) @klass = klass @message = message @block = block end
Public Instance Methods
run(cookbook, options = {})
click to toggle source
Execute this filter in the context of the creating class, inside the given cookbook's path.
@param [Cookbook]
the cookbook to run this filter against
# File lib/stove/filter.rb, line 49 def run(cookbook, options = {}) Stove::Log.info(message) instance = klass.new(cookbook, options) inside(cookbook) do instance.instance_eval(&block) end end