Module: Bebox::GeneralCommands

Defined in:
lib/bebox/commands/general_commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



4
5
6
# File 'lib/bebox/commands/general_commands.rb', line 4

def self.extended(base)
  base.load_commands
end

Instance Method Details

#load_commandsObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/bebox/commands/general_commands.rb', line 8

def load_commands
  # Project creation phase command
  desc 'Create a new bebox project through a simple wizard'
  arg_name '[project_name]'
  command :new do |project_command|
    project_command.action do |global_options,options,args|
      if args.count > 0
        Bebox::ProjectWizard.new.create_new_project("bebox-#{args.first}")
      else
        help_now!(error('You did not supply a project name'))
      end
    end
  end
end