summaryrefslogtreecommitdiff
path: root/lib/chef/chef_class.rb
diff options
context:
space:
mode:
authorRanjib Dey <ranjib@pagerduty.com>2015-06-19 15:32:04 -0700
committerRanjib Dey <ranjib@pagerduty.com>2015-06-23 23:03:02 -0700
commit9f0ea8aa0ec05819e242dedaa85fe731dca3146c (patch)
tree028c8ca206e3503243aeb50cfc7a2aa37995823a /lib/chef/chef_class.rb
parent3769bf187130c95d5ef2575a0f4ac9e06b197f5c (diff)
downloadchef-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.rb4
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