Class: Thor::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/engineyard/thor.rb

Overview

patch handle_no_method_error? to work with rubinius’ error text.

Instance Method Summary collapse

Instance Method Details

#handle_no_method_error?(instance, error, caller) ⇒ Boolean

Returns:

  • (Boolean)


208
209
210
211
212
213
# File 'lib/engineyard/thor.rb', line 208

def handle_no_method_error?(instance, error, caller)
  not_debugging?(instance) && (
    error.message =~ /^undefined method `#{name}' for #{Regexp.escape(instance.to_s)}$/ ||
    error.message =~ /undefined method `#{name}' on an instance of #{Regexp.escape(instance.class.name)}/
  )
end