Exception: LibPath::Exceptions::MalformedNameException
- Inherits:
-
LibPathBaseException
- Object
- StandardError
- LibPathBaseException
- LibPath::Exceptions::MalformedNameException
- Defined in:
- lib/libpath/exceptions/malformed_name_exception.rb
Overview
Exception thrown when a malformed name is encountered
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
(String) The name that is malformed.
Instance Method Summary collapse
-
#initialize(name, message = nil) ⇒ MalformedNameException
constructor
Initialises an instance from the given
name
and optionalmessage
.
Methods inherited from LibPathBaseException
Constructor Details
#initialize(name, message = nil) ⇒ MalformedNameException
Initialises an instance from the given name
and optional message
-
Parameters:
-
name
(String) The name that is malformed -
message
(String) optional The message. Ifnil
the message “malformed name ‘##name’” is used
-
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/libpath/exceptions/malformed_name_exception.rb', line 65 def initialize name, = nil unless = "malformed name '#{name}'" end super @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
(String) The name that is malformed
78 79 80 |
# File 'lib/libpath/exceptions/malformed_name_exception.rb', line 78 def name @name end |