Class: Dply::Cli::Task
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(argv) ⇒ Task
constructor
A new instance of Task.
- #lock ⇒ Object
- #run ⇒ Object
- #strategy ⇒ Object
Methods included from Logger
#debug?, #logger, stderr, #stderr
Constructor Details
#initialize(argv) ⇒ Task
Returns a new instance of Task.
12 13 14 |
# File 'lib/dply/cli/task.rb', line 12 def initialize(argv) @argv = argv end |
Instance Method Details
#config ⇒ Object
27 28 29 |
# File 'lib/dply/cli/task.rb', line 27 def config @config ||= Config.new.to_struct end |
#run ⇒ Object
16 17 18 19 20 21 |
# File 'lib/dply/cli/task.rb', line 16 def run task_name = @argv.shift error "task name not specified" if not task_name lock.acquire strategy.task(task_name) end |