Class: Seijaku::Host

Inherits:
Object
  • Object
show all
Defined in:
lib/seijaku/ssh/host.rb

Overview

Host of SSHGroup

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host) ⇒ Host

Returns a new instance of Host.



8
9
10
11
12
13
# File 'lib/seijaku/ssh/host.rb', line 8

def initialize(host)
  @host = host.fetch(:host, "localhost")
  @port = host.fetch(:port, 22)
  @bastion = host.fetch(:bastion, nil)
  @user = host.fetch(:user, "root")
end

Instance Attribute Details

#bastionObject (readonly)

Returns the value of attribute bastion.



6
7
8
# File 'lib/seijaku/ssh/host.rb', line 6

def bastion
  @bastion
end

#hostObject (readonly)

Returns the value of attribute host.



6
7
8
# File 'lib/seijaku/ssh/host.rb', line 6

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



6
7
8
# File 'lib/seijaku/ssh/host.rb', line 6

def port
  @port
end

#userObject (readonly)

Returns the value of attribute user.



6
7
8
# File 'lib/seijaku/ssh/host.rb', line 6

def user
  @user
end