Class: StartX::Runner

Inherits:
Object
  • Object
show all
Includes:
Commander::Methods
Defined in:
lib/start_x.rb

Instance Method Summary collapse

Instance Method Details

#runObject

include whatever modules you need



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/start_x.rb', line 17

def run
  program :name, 'starters'
  program :version, StartX::VERSION
  program :description, 'Easily kickoff projects from git'
  default_command :project

  command :config do |c|
    c.syntax = 'start config [options]'
    c.summary = ''
    c.description = ''
    c.example 'description', 'command example'
    c.option '--some-switch', 'Some switch that does something'
    c.action do |args, options|
      StartX::Config.new
    end
  end

  command :project do |c|
    c.syntax = 'start project [options]'
    c.summary = ''
    c.description = ''
    c.example 'description', 'command example'
    c.action do |args, options|
      StartX::Project.new
    end
  end

  run!
end