Exception: Omnibus::MissingSoftware

Inherits:
Error
  • Object
show all
Defined in:
lib/omnibus/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ MissingSoftware

Returns a new instance of MissingSoftware.



114
115
116
117
# File 'lib/omnibus/exceptions.rb', line 114

def initialize(name)
  @name = name
  @possible_paths = Omnibus.possible_paths_for(Config.software_dir)
end

Instance Method Details

#to_sObject



119
120
121
122
123
124
125
# File 'lib/omnibus/exceptions.rb', line 119

def to_s
  <<~EOH
    I could not find a software named `#{@name}' in any of the software locations:"

    #{@possible_paths.map { |path| "    #{path}" }.join("\n")}
  EOH
end