Sha256: 16c7aac8e303ba69862c2359dabb0910ff570f03352b4fa38d898b9192b319b8

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 Bytes

Contents

class DomainNotFound < StandardError
  attr_reader :domain
  def initialize(domain, port)
    @domain = domain
    @port = (port == 80 ? nil : port)
    super()
  end
  
  def error
    ["The site '#{@domain.gsub('.yodel', '')}' has not been created yet"]
  end
  
  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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/exceptions/domain_not_found.rb
yodel-0.0.4 lib/yodel/exceptions/domain_not_found.rb
yodel-0.0.3 lib/yodel/exceptions/domain_not_found.rb
yodel-0.0.2 lib/yodel/exceptions/domain_not_found.rb
yodel-0.0.1 lib/yodel/exceptions/domain_not_found.rb