Exception: MissingRootDirectory

Inherits:
StandardError
  • Object
show all
Defined in:
lib/yodel/exceptions/missing_root_directory.rb

Instance Method Summary collapse

Constructor Details

#initialize(site, port) ⇒ MissingRootDirectory

Returns a new instance of MissingRootDirectory.



2
3
4
5
6
# File 'lib/yodel/exceptions/missing_root_directory.rb', line 2

def initialize(site, port)
  @port = (port == 80 ? nil : port)
  @site = site
  super()
end

Instance Method Details

#descriptionObject



12
13
14
# File 'lib/yodel/exceptions/missing_root_directory.rb', line 12

def description
  "You can <a href='http://yodel#{':' if @port}#{@port}/sites?id=#{@site.id}'>select a new root directory</a>, or rename the existing directory back to '#{File.basename(@site.root_directory)}'."
end

#errorObject



8
9
10
# File 'lib/yodel/exceptions/missing_root_directory.rb', line 8

def error
  ["The root directory for #{@site.name} is missing"]
end