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



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

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



104
105
106
# File 'lib/uniword/errors.rb', line 104

def feature
  @feature
end

#gem_nameString (readonly)

Returns The gem name.

Returns:

  • (String)

    The gem name



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

def gem_name
  @gem_name
end