Class: Eco::API::Session::Config::SFTP

Inherits:
BaseConfig show all
Defined in:
lib/eco/api/session/config/sftp.rb

Instance Attribute Summary

Attributes inherited from BaseConfig

#config

Attributes included from Language::AuxiliarLogger

#logger

Instance Method Summary collapse

Methods inherited from BaseConfig

#apis, attr_key, #clone, #file_manager, #initialize

Methods included from Language::AuxiliarLogger

#log

Methods inherited from Hash

#deep_merge, #deep_merge!

Constructor Details

This class inherits a constructor from Eco::API::Session::Config::BaseConfig

Instance Method Details

#configured?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/eco/api/session/config/sftp.rb', line 10

def configured?
  required = host && user && (key_file || password)
  !!required
end

#enviro_subpathObject



19
20
21
# File 'lib/eco/api/session/config/sftp.rb', line 19

def enviro_subpath
  enviro_subpaths[config.active_enviro]
end

#enviro_subpathsObject



15
16
17
# File 'lib/eco/api/session/config/sftp.rb', line 15

def enviro_subpaths
  self['enviro_subpaths'] ||= {}
end

#remote_folderObject



23
24
25
# File 'lib/eco/api/session/config/sftp.rb', line 23

def remote_folder
  [base_path, enviro_subpath].compact.join("/")
end