module Dawn::CLI::Drain

Public Class Methods

add(url) click to toggle source

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

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

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

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

“List all drains for the current app”

# File lib/dawn/cli/commands/drain.rb, line 11
def self.list
  say format_drains(current_app.drains.all)
end