Exception: DomainNotFound
- Inherits:
-
StandardError
- Object
- StandardError
- DomainNotFound
- Defined in:
- lib/yodel/exceptions/domain_not_found.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
Instance Method Summary collapse
- #description ⇒ Object
- #error ⇒ Object
-
#initialize(domain, port) ⇒ DomainNotFound
constructor
A new instance of DomainNotFound.
Constructor Details
#initialize(domain, port) ⇒ DomainNotFound
Returns a new instance of DomainNotFound.
3 4 5 6 7 |
# File 'lib/yodel/exceptions/domain_not_found.rb', line 3 def initialize(domain, port) @domain = domain @port = (port == 80 ? nil : port) super() end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
2 3 4 |
# File 'lib/yodel/exceptions/domain_not_found.rb', line 2 def domain @domain end |
Instance Method Details
#description ⇒ Object
13 14 15 |
# File 'lib/yodel/exceptions/domain_not_found.rb', line 13 def description "<form action='http://yodel#{':' if @port}#{@port}/sites' method='post' class='inline'><input type='hidden' name='name'' value='#{@domain}'><a href='#' onclick='submit()'>Create a new site</a></form> or try a different address." end |
#error ⇒ Object
9 10 11 |
# File 'lib/yodel/exceptions/domain_not_found.rb', line 9 def error ["The site '#{@domain.gsub('.yodel', '')}' has not been created yet"] end |