Exception: Lithic::Errors::MissingDependencyError

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

Instance Method Summary collapse

Constructor Details

#initialize(gem_name:, feature:) ⇒ MissingDependencyError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MissingDependencyError.

Parameters:

  • gem_name (String)
  • feature (String)


233
234
235
236
237
238
239
240
# File 'lib/lithic/errors.rb', line 233

def initialize(gem_name:, feature:)
  message = [
    "The '#{gem_name}' gem is required to use #{feature}.",
    "Install it with: gem install #{gem_name}",
    "Or add it to your Gemfile: gem '#{gem_name}'"
  ].join("\n")
  super(message)
end