Class: Bolt::Task::Remote

Inherits:
Bolt::Task show all
Defined in:
lib/bolt/task/remote.rb

Instance Attribute Summary

Attributes inherited from Bolt::Task

#file, #files, #metadata, #name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Bolt::Task

#description, #file_path, #initialize, #module_name, #parameters, #supports_noop, #tasks_dir

Constructor Details

This class inherits a constructor from Bolt::Task

Class Method Details

.from_task(task) ⇒ Object



8
9
10
# File 'lib/bolt/task/remote.rb', line 8

def self.from_task(task)
  new(task.name, task.file, task.files, task.)
end

Instance Method Details

#implementationsObject



12
13
14
# File 'lib/bolt/task/remote.rb', line 12

def implementations
  ['implementations']&.select { |i| i['remote'] || ['remote'] }
end

#select_implementation(target, *args) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/bolt/task/remote.rb', line 16

def select_implementation(target, *args)
  unless implementations || ['remote']
    raise NoImplementationError.new(target, self)
  end

  super(target, *args)
end