summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shestoperov <dmitry@shestoperov.info>2017-11-07 23:16:51 -0500
committerDmitry Shestoperov <dmitry@shestoperov.info>2017-11-07 23:16:51 -0500
commit335de911e800a49b94565ea7cb56c50ed1ae39a6 (patch)
tree8b0303b7d61d1a73ae43c461d21d4d0bd70cc2b2
parente86b8e83ba571b84307a5f04e1eb64703eb523f2 (diff)
downloadchef-335de911e800a49b94565ea7cb56c50ed1ae39a6.tar.gz
Simplified conversion
Signed-off-by: Dmitry Shestoperov <dmitry@shestoperov.info>
-rw-r--r--lib/chef/resource/resource_notification.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/resource/resource_notification.rb b/lib/chef/resource/resource_notification.rb
index 2786e4c39b..20e3c75b67 100644
--- a/lib/chef/resource/resource_notification.rb
+++ b/lib/chef/resource/resource_notification.rb
@@ -26,11 +26,7 @@ class Chef
def initialize(resource, action, notifying_resource)
@resource = resource
- @action = if action.respond_to?(:to_sym)
- action.to_sym
- else
- action
- end
+ @action = action&.to_sym
@notifying_resource = notifying_resource
end