Exception: MissingRootDirectory
- Inherits:
-
StandardError
- Object
- StandardError
- MissingRootDirectory
- Defined in:
- lib/yodel/exceptions/missing_root_directory.rb
Instance Method Summary collapse
- #description ⇒ Object
- #error ⇒ Object
-
#initialize(site, port) ⇒ MissingRootDirectory
constructor
A new instance of MissingRootDirectory.
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
#description ⇒ Object
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 |
#error ⇒ Object
8 9 10 |
# File 'lib/yodel/exceptions/missing_root_directory.rb', line 8 def error ["The root directory for #{@site.name} is missing"] end |