Class: Cheffish::ChefRun::EventSink
- Inherits:
-
Object
- Object
- Cheffish::ChefRun::EventSink
- Defined in:
- lib/cheffish/chef_run.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize ⇒ EventSink
constructor
A new instance of EventSink.
- #method_missing(method, *args) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize ⇒ EventSink
Returns a new instance of EventSink.
144 145 146 |
# File 'lib/cheffish/chef_run.rb', line 144 def initialize @events = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
150 151 152 |
# File 'lib/cheffish/chef_run.rb', line 150 def method_missing(method, *args) @events << [ method, *args ] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
148 149 150 |
# File 'lib/cheffish/chef_run.rb', line 148 def events @events end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
154 155 156 157 158 159 |
# File 'lib/cheffish/chef_run.rb', line 154 def respond_to_missing?(method_name, include_private = false) # Chef::EventDispatch::Dispatcher calls #respond_to? to see (basically) if we'll accept an event; # obviously, per above #method_missing, we'll accept whatever we're given. if there's a problem, it # will surface higher up the stack. true end |