Skip to content

Commit 7214ade

Browse files
committed
Better way to check for private methods
1 parent 82ad783 commit 7214ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/workflow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def run_action(action, *args)
268268
end
269269

270270
def has_callback?(action)
271-
self.respond_to?(action) or self.private_methods.map { |n| n.to_sym }.include?(action)
271+
self.respond_to?(action) or self.class.private_method_defined?(action)
272272
end
273273

274274
def run_action_callback(action_name, *args)

0 commit comments

Comments
 (0)