Method: Synco::Server#initialize

Defined in:
lib/synco/server.rb

#initialize(name, root: '/', shell: nil, **options) ⇒ Server

Returns a new instance of Server.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/synco/server.rb', line 29

def initialize(name, root: '/', shell: nil, **options)
	super()
	
	@name = name
	
	case @name
	when Symbol
		@host = "localhost"
	else
		@host = name.to_s
	end
	
	@root = root
	@shell = shell || Shells::SSH.new
	
	@options = options
end