Methods
M
Instance Public methods
missing_name()

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

   # File activesupport/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)

Was this exception raised because the given name was missing?

    # File activesupport/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