Exception: Omnibus::MissingProject

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

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ MissingProject

Returns a new instance of MissingProject.



99
100
101
102
# File 'lib/omnibus/exceptions.rb', line 99

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

Instance Method Details

#to_sObject



104
105
106
107
108
109
110
# File 'lib/omnibus/exceptions.rb', line 104

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

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