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

Instance Method Summary collapse

Methods inherited from BaseConfig

#clone, #initialize

Methods inherited from Hash

#deep_merge, #deep_merge!

Constructor Details

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

Instance Method Details

#base_pathObject



40
41
42
# File 'lib/eco/api/session/config/sftp.rb', line 40

def base_path
  self["base_path"]
end

#base_path=(path) ⇒ Object



36
37
38
# File 'lib/eco/api/session/config/sftp.rb', line 36

def base_path=(path)
  self["base_path"] = path
end

#configured?Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/eco/api/session/config/sftp.rb', line 7

def configured?
  required = host && user && key_file
  !!required
end

#enviro_subpathObject



52
53
54
# File 'lib/eco/api/session/config/sftp.rb', line 52

def enviro_subpath
  enviro_subpaths[config.active_enviro]
end

#enviro_subpathsObject



48
49
50
# File 'lib/eco/api/session/config/sftp.rb', line 48

def enviro_subpaths
  self["enviro_subpaths"]
end

#enviro_subpaths=(hash) ⇒ Object



44
45
46
# File 'lib/eco/api/session/config/sftp.rb', line 44

def enviro_subpaths=(hash)
  self["enviro_subpaths"] = hash
end

#hostObject



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

def host
  self["host"]
end

#host=(value) ⇒ Object



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

def host=(value)
  self["host"] = value
end

#key_fileObject



32
33
34
# File 'lib/eco/api/session/config/sftp.rb', line 32

def key_file
  self["key_file"]
end

#key_file=(key) ⇒ Object



28
29
30
# File 'lib/eco/api/session/config/sftp.rb', line 28

def key_file=(key)
  self["key_file"] = key
end

#remote_folderObject



56
57
58
# File 'lib/eco/api/session/config/sftp.rb', line 56

def remote_folder
  base_path + "/" + enviro_subpath
end

#userObject



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

def user
  self["user"]
end

#user=(value) ⇒ Object



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

def user=(value)
  self["user"] = value
end