Class: Envoi::Mam::Agent::TransferClient

Inherits:
Object
  • Object
show all
Defined in:
lib/envoi/mam/agent/transfer_client.rb,
lib/envoi/mam/agent/transfer_client/s3.rb,
lib/envoi/mam/agent/transfer_client/aspera.rb

Direct Known Subclasses

Aspera, S3

Defined Under Namespace

Classes: Aspera, S3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = { }) ⇒ TransferClient

Returns a new instance of TransferClient.



11
12
13
14
15
16
17
# File 'lib/envoi/mam/agent/transfer_client.rb', line 11

def initialize(args = { })
  @initial_args = args
  @agent = args[:agent]
  initialize_logger(args)

  after_initialize
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



9
10
11
# File 'lib/envoi/mam/agent/transfer_client.rb', line 9

def agent
  @agent
end

#initial_argsObject

Returns the value of attribute initial_args.



9
10
11
# File 'lib/envoi/mam/agent/transfer_client.rb', line 9

def initial_args
  @initial_args
end

#loggerObject

Returns the value of attribute logger.



9
10
11
# File 'lib/envoi/mam/agent/transfer_client.rb', line 9

def logger
  @logger
end

Instance Method Details

#after_initializeObject



19
20
21
# File 'lib/envoi/mam/agent/transfer_client.rb', line 19

def after_initialize
  # To be overridden by child class
end

#initialize_logger(args = { }) ⇒ Object



23
24
25
# File 'lib/envoi/mam/agent/transfer_client.rb', line 23

def initialize_logger(args = { })
  @logger = agent.logger if agent && agent.respond_to?(:logger) && agent.logger
end