Methods
Instance Public methods
missing_name()
Link
Extract the name of the missing constant from the exception message.
begin
HelloWorld
rescue NameError => e
e.missing_name
end
# => "HelloWorld"
missing_name?(name)
Link
Was this exception raised because the given name was missing?
begin
HelloWorld
rescue NameError => e
e.missing_name?("HelloWorld")
end
# => true