Class: Cerberus::ListCommand
- Inherits:
-
Object
- Object
- Cerberus::ListCommand
- Defined in:
- lib/cerberus/manager.rb
Instance Method Summary collapse
-
#initialize(cli_options = {}) ⇒ ListCommand
constructor
A new instance of ListCommand.
- #run ⇒ Object
Constructor Details
#initialize(cli_options = {}) ⇒ ListCommand
Returns a new instance of ListCommand.
214 215 |
# File 'lib/cerberus/manager.rb', line 214 def initialize( = {}) end |
Instance Method Details
#run ⇒ Object
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/cerberus/manager.rb', line 217 def run projects = Dir["#{HOME}/config/*.yml"] if projects.empty? puts "There are no active projects" else puts "List of active projects:" projects.sort.each do |fn| fn =~ %r{#{HOME}/config/(.*).yml} puts " * #{$1}" end puts "\nType 'cerberus build PROJECT_NAME' to build any of these projects" end end |