Class: Eclix::Remote

Inherits:
Object
  • Object
show all
Defined in:
lib/eclix/sync.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, host, port, credentials) ⇒ Remote

Returns a new instance of Remote.



14
15
16
17
18
19
# File 'lib/eclix/sync.rb', line 14

def initialize(name, host, port, credentials)
    @name = name
    @host = host
    @port = port
    @credentials = credentials
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



13
14
15
# File 'lib/eclix/sync.rb', line 13

def credentials
  @credentials
end

#hostObject (readonly)

Returns the value of attribute host.



13
14
15
# File 'lib/eclix/sync.rb', line 13

def host
  @host
end

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/eclix/sync.rb', line 13

def name
  @name
end

#portObject (readonly)

Returns the value of attribute port.



13
14
15
# File 'lib/eclix/sync.rb', line 13

def port
  @port
end

Instance Method Details

#passwordObject



21
22
23
# File 'lib/eclix/sync.rb', line 21

def password
    credentials.password
end

#publication_dir(publication_name) ⇒ Object



29
30
31
# File 'lib/eclix/sync.rb', line 29

def publication_dir(publication_name)
    "/opt/tomcat-#{name}/webapps-#{publication_name}/#{publication_name}/"
end

#userObject



25
26
27
# File 'lib/eclix/sync.rb', line 25

def user
    credentials.user
end