Exception: Omnibus::MissingTemplate

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

Instance Method Summary collapse

Constructor Details

#initialize(template, search_paths) ⇒ MissingTemplate

Returns a new instance of MissingTemplate.



84
85
86
# File 'lib/omnibus/exceptions.rb', line 84

def initialize(template, search_paths)
  @template, @search_paths = template, search_paths
end

Instance Method Details

#to_sObject



88
89
90
91
92
93
94
95
# File 'lib/omnibus/exceptions.rb', line 88

def to_s
  <<~EOH
    Attempting to evaluate the template `#{@template}', but it was not found at any of
    the following locations:

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