Class: Arcabouco::Command
- Inherits:
-
Object
- Object
- Arcabouco::Command
- Defined in:
- lib/arcabouco/cmd.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Command
constructor
A new instance of Command.
- #run(args = ARGV) ⇒ Object
Constructor Details
#initialize ⇒ Command
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 '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 |