module Dawn::CLI::Domain

Public Class Methods

add(url) click to toggle source

“Add a new domain to the current app” @param [String] url

# File lib/dawn/cli/commands/domain.rb, line 19
def self.add(url)
  current_app.domains.create(domain: { url: url })
rescue Excon::Errors::Conflict => ex
  handle_abort_exception("dawn domain add", ex)
end
delete(url) click to toggle source

“Remove an existing domain from the current app” @param [String] url

# File lib/dawn/cli/commands/domain.rb, line 29
def self.delete(url)
  current_app.domains.destroy(url: url)
rescue Excon::Errors::NotFound => ex
  handle_abort_exception("dawn domain delete", ex)
end
list() click to toggle source

“List all domains for the current app”

# File lib/dawn/cli/commands/domain.rb, line 11
def self.list
  say format_domains(current_app.domains.all)
end