Class: TravisCustomDeploy::Transfer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/travis-custom-deploy/transfer/base.rb

Direct Known Subclasses

Copy, Ftp, Sftp

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, files) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
# File 'lib/travis-custom-deploy/transfer/base.rb', line 10

def initialize(options, files)
  @options = options
  @files = files
  check_options(options)
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



8
9
10
# File 'lib/travis-custom-deploy/transfer/base.rb', line 8

def files
  @files
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/travis-custom-deploy/transfer/base.rb', line 7

def options
  @options
end

Instance Method Details

#check_optionsObject

The method which needs to be implemented by subclasses to check if the remote options are sufficient for the defined transfer type

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/travis-custom-deploy/transfer/base.rb', line 25

def check_options
  raise NotImplementedError
end

#transferObject

The method which needs to be implemented by subclasses of transfer types.

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/travis-custom-deploy/transfer/base.rb', line 18

def transfer
  raise NotImplementedError 
end