Exception: Ace::Review::Errors::MissingDependencyError

Inherits:
Error
  • Object
show all
Defined in:
lib/ace/review/errors.rb

Overview

Raised when a required dependency is missing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependency_name, install_command = nil) ⇒ MissingDependencyError

Returns a new instance of MissingDependencyError.



14
15
16
17
18
19
20
21
22
# File 'lib/ace/review/errors.rb', line 14

def initialize(dependency_name, install_command = nil)
  @dependency_name = dependency_name
  @install_command = install_command || "gem install #{dependency_name}"

  message = "Required gem '#{dependency_name}' not found.\n"
  message += "Install with: #{@install_command}"

  super(message)
end

Instance Attribute Details

#dependency_nameObject (readonly)

Returns the value of attribute dependency_name.



12
13
14
# File 'lib/ace/review/errors.rb', line 12

def dependency_name
  @dependency_name
end

#install_commandObject (readonly)

Returns the value of attribute install_command.



12
13
14
# File 'lib/ace/review/errors.rb', line 12

def install_command
  @install_command
end