Class: Really::FileTransferCommand

Inherits:
Command show all
Defined in:
lib/really/file_transfer_command.rb

Instance Attribute Summary collapse

Attributes inherited from Command

#options

Instance Method Summary collapse

Methods inherited from Command

#command

Constructor Details

#initialize(source_path, destination_path, options = {}) ⇒ FileTransferCommand

Returns a new instance of FileTransferCommand.



9
10
11
12
13
# File 'lib/really/file_transfer_command.rb', line 9

def initialize(source_path, destination_path, options = {})
  super nil, options
  @source_path = source_path
  @destination_path = destination_path
end

Instance Attribute Details

#destination_pathObject

Returns the value of attribute destination_path.



7
8
9
# File 'lib/really/file_transfer_command.rb', line 7

def destination_path
  @destination_path
end

Instance Method Details

#source_pathObject



15
16
17
18
# File 'lib/really/file_transfer_command.rb', line 15

def source_path
  return rendered_source_path if @options[:render]
  @source_path
end

#to_sObject



20
21
22
# File 'lib/really/file_transfer_command.rb', line 20

def to_s
  "<#{self.class} source:'#{@source_path}' dest:'#{@destination_path}'>"
end