Exception: Hglib::DisabledExtensionError
- Defined in:
- lib/hglib.rb
Overview
Exception raised when a command failed because the extension it belongs to was disabled.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
The command that failed.
-
#extension ⇒ Object
readonly
The name of the extension which defines the #command.
Instance Method Summary collapse
-
#initialize(command, extension) ⇒ DisabledExtensionError
constructor
Create a new instance for the given
commandand the name of theextensionwhich defines it. -
#message ⇒ Object
Return an message describing what the command and disabled extension were.
Constructor Details
#initialize(command, extension) ⇒ DisabledExtensionError
Create a new instance for the given command and the name of the extension which defines it.
93 94 95 96 |
# File 'lib/hglib.rb', line 93 def initialize( command, extension ) @command = command @extension = extension end |
Instance Attribute Details
#command ⇒ Object (readonly)
The command that failed
101 102 103 |
# File 'lib/hglib.rb', line 101 def command @command end |
#extension ⇒ Object (readonly)
The name of the extension which defines the #command
105 106 107 |
# File 'lib/hglib.rb', line 105 def extension @extension end |
Instance Method Details
#message ⇒ Object
Return an message describing what the command and disabled extension were.
109 110 111 112 113 114 |
# File 'lib/hglib.rb', line 109 def return "`%s`: command is provided by disabled extension `%s`" % [ self.command, self.extension, ] end |