Exception: Mactag::GemNotFoundError

Inherits:
MactagError
  • Object
show all
Defined in:
lib/mactag/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem) ⇒ GemNotFoundError

Returns a new instance of GemNotFoundError.



20
21
22
# File 'lib/mactag/errors.rb', line 20

def initialize(gem)
  @gem = gem
end

Instance Attribute Details

#gemObject (readonly)

Returns the value of attribute gem.



18
19
20
# File 'lib/mactag/errors.rb', line 18

def gem
  @gem
end

Instance Method Details

#to_sObject



24
25
26
27
28
29
30
# File 'lib/mactag/errors.rb', line 24

def to_s
  if gem.version
    "Gem #{gem.name} with version #{gem.version} not found"
  else
    "Gem #{gem.name} not found"
  end
end