Parent

Class Index [+]

Quicksearch

NameError

Public Instance Methods

missing_name() click to toggle source

Extract the name of the missing constant from the exception message.

   # File lib/active_support/core_ext/name_error.rb, line 3
3:   def missing_name
4:     if /undefined local variable or method/ !~ message
5:       $1 if /((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/ =~ message
6:     end
7:   end
missing_name?(name) click to toggle source

Was this exception raised because the given name was missing?

    # File lib/active_support/core_ext/name_error.rb, line 10
10:   def missing_name?(name)
11:     if name.is_a? Symbol
12:       last_name = (missing_name || '').split('::').last
13:       last_name == name.to_s
14:     else
15:       missing_name == name.to_s
16:     end
17:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.