Exception: Konstructor::ReservedNameError

Inherits:
Error
  • Object
show all
Defined in:
lib/konstructor/exceptions.rb

Overview

Raised if reserved names new or initialize are used in declaration.

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ReservedNameError

Returns a new instance of ReservedNameError.



10
11
12
13
# File 'lib/konstructor/exceptions.rb', line 10

def initialize(name)
  super "Custom constructor can't have name '#{name}', "
        "it is reserved for default constructor."
end