Module: Dawn::CLI::Drain
- Extended by:
- Helpers
- Defined in:
- lib/dawn/cli/commands/drain.rb
Class Method Summary collapse
-
.add(url) ⇒ Object
“Add a new drain to the current app”.
-
.delete(url) ⇒ Object
“Remove an existing drain from the current app”.
-
.list ⇒ Object
“List all drains for the current app”.
Methods included from Helpers
current_app, current_app_name, extract_app_in_dir, extract_app_remote_from_git_config, git, git_add_dawn_remote, git_dawn_remote?, git_remotes, git_remove_dawn_remote, has_git?, try_create_app
Methods included from OutputFormatter
#format_apps, #format_domains, #format_drains, #format_gears, #format_keys, #table_style
Class Method Details
.add(url) ⇒ Object
“Add a new drain to the current app”
15 16 17 |
# File 'lib/dawn/cli/commands/drain.rb', line 15 def self.add(url) current_app.drains.create(drain: { url: url }) end |
.delete(url) ⇒ Object
“Remove an existing drain from the current app”
20 21 22 |
# File 'lib/dawn/cli/commands/drain.rb', line 20 def self.delete(url) current_app.drains.delete(url: url) end |
.list ⇒ Object
“List all drains for the current app”
10 11 12 |
# File 'lib/dawn/cli/commands/drain.rb', line 10 def self.list say format_drains(current_app.drains.all) end |