Class: Cosmo::Shell

Inherits:
Bombshell::Environment
  • Object
show all
Includes:
Bombshell::Shell
Defined in:
lib/cosmo/shell.rb

Defined Under Namespace

Classes: Group

Instance Method Summary collapse

Instance Method Details

#use(arg = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cosmo/shell.rb', line 6

def use arg = nil
  if arg
    if Cosmo.groups[arg]
      Group.launch arg
    else
      puts "Sorry no such group try one of:"
      puts Cosmo.groups.keys.join("\n")
    end
  else
    puts "Sorry no such group try one of:"
    puts Cosmo.groups.keys.join("\n")
  end
end