Exception: Dcc::MissingDependencyError

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

Overview

Raised when a soft dependency (xmldsig, sinatra, etc.) is required but not installed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_name:, feature:) ⇒ MissingDependencyError

Returns a new instance of MissingDependencyError.



48
49
50
51
52
# File 'lib/dcc/error.rb', line 48

def initialize(gem_name:, feature:)
  @gem_name = gem_name
  @feature = feature
  super("The '#{gem_name}' gem is required for #{feature}. Add it to your Gemfile or run: gem install #{gem_name}")
end

Instance Attribute Details

#featureObject (readonly)

Returns the value of attribute feature.



46
47
48
# File 'lib/dcc/error.rb', line 46

def feature
  @feature
end

#gem_nameObject (readonly)

Returns the value of attribute gem_name.



46
47
48
# File 'lib/dcc/error.rb', line 46

def gem_name
  @gem_name
end