Class: Arcabouco::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/arcabouco/cmd.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommand

Returns a new instance of Command.



10
11
# File 'lib/arcabouco/cmd.rb', line 10

def initialize
end

Class Method Details

.run(args = ARGV) ⇒ Object



6
7
8
# File 'lib/arcabouco/cmd.rb', line 6

def self.run(args = ARGV)
  new.run(args)
end

Instance Method Details

#run(args = ARGV) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/arcabouco/cmd.rb', line 13

def run(args = ARGV)
  opts = Slop.parse do
    banner 'Usage: arcabouco [options]'

    on 's', 'server', 'Run as server'
    on 'b', 'build', 'Build'
  end
  Arcabouco::Application.new
  if opts.server?
    run_server
  elsif opts.build?
    run_build
  else
    puts opts
  end
end