Exception: NameError

Inherits:
StandardError show all
Defined in:
mrblib/10error.rb

Overview

ISO 15.2.31

Direct Known Subclasses

NoMethodError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Exception

#backtrace, #exception, #inspect, #message, #set_backtrace, #to_s

Constructor Details

#initialize(message = nil, name = nil) ⇒ NameError

Returns a new instance of NameError



28
29
30
31
# File 'mrblib/10error.rb', line 28

def initialize(message=nil, name=nil)
  @name = name
  super(message)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name



26
27
28
# File 'mrblib/10error.rb', line 26

def name
  @name
end