public Method

NameError.missing_name

Add a method to obtain the missing name from a NameError.

Source Code

# File active_support/core_ext/name_error.rb, line 4
def missing_name
  $1 if /((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/ =~ message
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.