Class: Utilikilt::CLI
- Inherits:
-
Thor
- Object
- Thor
- Utilikilt::CLI
- Defined in:
- lib/utilikilt/cli.rb
Instance Method Summary collapse
- #build(project_dir = nil) ⇒ Object
- #serve(project_dir = nil) ⇒ Object
- #up(project_dir = nil) ⇒ Object
- #watch(project_dir = nil) ⇒ Object
- #workspace(workspace_name) ⇒ Object
Instance Method Details
#build(project_dir = nil) ⇒ Object
21 22 23 24 |
# File 'lib/utilikilt/cli.rb', line 21 def build( project_dir = nil ) opts = (project_dir,) run_one_off_scan( opts ) end |
#serve(project_dir = nil) ⇒ Object
27 28 29 30 |
# File 'lib/utilikilt/cli.rb', line 27 def serve( project_dir = nil ) opts = (project_dir,) start_serve( opts ) end |
#up(project_dir = nil) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/utilikilt/cli.rb', line 35 def up( project_dir=nil ) watch_thread = Thread.new{ watch(project_dir) } serve_thread = Thread.new{ serve(project_dir) } serve_thread.join # joining on serve rather than watch is arbitrary end |
#watch(project_dir = nil) ⇒ Object
13 14 15 16 |
# File 'lib/utilikilt/cli.rb', line 13 def watch( project_dir = nil ) opts = (project_dir,) start_watcher(opts) end |