Class: Blender::Task::Scp

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/blender/tasks/scp.rb

Instance Attribute Summary

Attributes inherited from Base

#command, #driver, #driver_opts, #hosts, #metadata, #name

Instance Method Summary collapse

Methods inherited from Base

#add_metadata, #default_metadata, #driver_options, #execute, #ignore_failure, #members, #use_driver

Methods included from Discovery

#build_discovery, #old_search, #search, #search_with_config

Methods included from Utils::Refinements

#camelcase, #symbolize

Constructor Details

#initialize(name, metadata = {}) ⇒ Scp

Returns a new instance of Scp.



28
29
30
31
32
33
34
35
# File 'lib/blender/tasks/scp.rb', line 28

def initialize(name,  = {})
  super
  @command = Struct.new(:direction, :source, :target, :options).new
  @command.target = name
  @command.source = name
  @command.options = {}
  @direction = :upload
end

Instance Method Details

#chunk_size(val) ⇒ Object



53
54
55
# File 'lib/blender/tasks/scp.rb', line 53

def chunk_size(val)
  @command.options[:chunk_size] = val
end

#from(source) ⇒ Object



37
38
39
# File 'lib/blender/tasks/scp.rb', line 37

def from(source)
  @command.source = source
end

#preserve(val) ⇒ Object



49
50
51
# File 'lib/blender/tasks/scp.rb', line 49

def preserve(val)
  @command.options[:preserve] = val
end

#recursive(val) ⇒ Object



45
46
47
# File 'lib/blender/tasks/scp.rb', line 45

def recursive(val)
  @command.options[:recursive] = val
end

#to(target) ⇒ Object



41
42
43
# File 'lib/blender/tasks/scp.rb', line 41

def to(target)
  @command.target = target
end