Class: Greenhouse::Commands::Add
- Inherits:
-
Object
- Object
- Greenhouse::Commands::Add
- Includes:
- Command
- Defined in:
- lib/greenhouse/commands/add.rb
Instance Method Summary collapse
Methods included from Command
Instance Method Details
#add_another? ⇒ Boolean
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/greenhouse/commands/add.rb', line 7 def add_another? another = nil while !['', 'n','no'].include?(another) do puts "The following projects are configured in your ecosystem: " #Projects::projects.each do |project| # puts # Tasks::ProjectStatus.perform(project) #end Projects.projects.each do |project| puts " #{project.title.cyan}" end puts print "Would you like to add another project? ([y]es/[N]o): " another = STDIN.gets.chomp.downcase Tasks::AddProject.perform if ['y','yes'].include?(another) end end |
#run ⇒ Object
25 26 27 28 29 |
# File 'lib/greenhouse/commands/add.rb', line 25 def run Tasks::AddProject.perform add_another? end |