diff options
Diffstat (limited to 'lib/bundler/vendor/thor/task.rb')
-rw-r--r--[-rwxr-xr-x] | lib/bundler/vendor/thor/task.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/vendor/thor/task.rb b/lib/bundler/vendor/thor/task.rb index a4355831..6db3b608 100755..100644 --- a/lib/bundler/vendor/thor/task.rb +++ b/lib/bundler/vendor/thor/task.rb @@ -65,10 +65,9 @@ class Thor @required_options ||= options.map{ |_, o| o.usage if o.required? }.compact.sort.join(" ") end - # Given a target, checks if this class name is not a private/protected method. + # Given a target, checks if this class name is a public method. def public_method?(instance) #:nodoc: - collection = instance.private_methods + instance.protected_methods - (collection & [name.to_s, name.to_sym]).empty? + !(instance.public_methods & [name.to_s, name.to_sym]).empty? end def sans_backtrace(backtrace, caller) #:nodoc: @@ -111,4 +110,4 @@ class Thor end end end -end
\ No newline at end of file +end |