diff options
author | Ranjib Dey <ranjib@pagerduty.com> | 2015-06-19 15:32:04 -0700 |
---|---|---|
committer | Ranjib Dey <ranjib@pagerduty.com> | 2015-06-23 23:03:02 -0700 |
commit | 9f0ea8aa0ec05819e242dedaa85fe731dca3146c (patch) | |
tree | 028c8ca206e3503243aeb50cfc7a2aa37995823a /lib/chef/chef_class.rb | |
parent | 3769bf187130c95d5ef2575a0f4ac9e06b197f5c (diff) | |
download | chef-9f0ea8aa0ec05819e242dedaa85fe731dca3146c.tar.gz |
add name class attribute for user defined handlers. more readable invalid event handler exception name.
Diffstat (limited to 'lib/chef/chef_class.rb')
-rw-r--r-- | lib/chef/chef_class.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/chef_class.rb b/lib/chef/chef_class.rb index c490615861..d9c141b85d 100644 --- a/lib/chef/chef_class.rb +++ b/lib/chef/chef_class.rb @@ -51,8 +51,10 @@ class Chef attr_reader :run_context # Register an event handler with user specified block + # + # @return[Chef::EventDispatch::Base] handler object def event_handler(&block) - dsl = Chef::EventDispatch::DSL.new + dsl = Chef::EventDispatch::DSL.new('Chef client DSL') dsl.instance_eval(&block) end |