Exception: Uniword::DependencyError

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

Overview

Raised when a required dependency is missing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_name, feature) ⇒ DependencyError

Returns a new instance of DependencyError.

Parameters:

  • gem_name (String)

    The name of the missing gem

  • feature (String)

    The feature that requires it



87
88
89
90
91
# File 'lib/uniword/errors.rb', line 87

def initialize(gem_name, feature)
  super("Missing dependency '#{gem_name}' required for #{feature}. Install with: gem install #{gem_name}")
  @gem_name = gem_name
  @feature = feature
end

Instance Attribute Details

#featureString (readonly)

Returns The feature.

Returns:

  • (String)

    The feature



97
98
99
# File 'lib/uniword/errors.rb', line 97

def feature
  @feature
end

#gem_nameString (readonly)

Returns The gem name.

Returns:

  • (String)

    The gem name



94
95
96
# File 'lib/uniword/errors.rb', line 94

def gem_name
  @gem_name
end