Class: Greenhouse::Commands::Remove
- Inherits:
-
Object
- Object
- Greenhouse::Commands::Remove
- Includes:
- Command
- Defined in:
- lib/greenhouse/commands/remove.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Command
Class Method Details
.usage ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/greenhouse/commands/remove.rb', line 9 def usage puts <<USAGE usage: #{::Greenhouse::CLI.command_name} #{command_name} <project> Projects: #{project_arguments.to_help} USAGE end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/greenhouse/commands/remove.rb', line 19 def run if arguments.empty? puts "You must provide the name of the project you want to remove from your ecosystem." usage return end project = Projects::projects.select { |proj| proj.name == arguments[0].key }.first Tasks::PurgeProject.perform(project) Tasks::RemoveProject.perform(project) end |