Exception: Hglib::DisabledExtensionError

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

Overview

Exception raised when a command failed because the extension it belongs to was disabled.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject (readonly)

The command that failed



101
102
103
# File 'lib/hglib.rb', line 101

def command
  @command
end

#extensionObject (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

#messageObject

Return an message describing what the command and disabled extension were.



109
110
111
112
113
114
# File 'lib/hglib.rb', line 109

def message
  return "`%s`: command is provided by disabled extension `%s`" % [
    self.command,
    self.extension,
  ]
end