Class: Dply::Cli::Task
Instance Method Summary collapse
-
#initialize(argv) ⇒ Task
constructor
A new instance of Task.
- #lock ⇒ Object
- #run ⇒ Object
Methods included from Logger
#debug?, #logger, stderr, #stderr
Constructor Details
#initialize(argv) ⇒ Task
Returns a new instance of Task.
11 12 13 |
# File 'lib/dply/cli/task.rb', line 11 def initialize(argv) @argv = argv end |
Instance Method Details
#lock ⇒ Object
25 26 27 |
# File 'lib/dply/cli/task.rb', line 25 def lock @lock ||= Lock.new(Dir.pwd) end |
#run ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/dply/cli/task.rb', line 15 def run task_name = @argv.shift error "task name not specified" if not task_name lock.acquire Dir.chdir "current" do app_config = AppConfig.new app_config.run_task task_name end end |