Class: Seijaku::Host
- Inherits:
-
Object
- Object
- Seijaku::Host
- Defined in:
- lib/seijaku/ssh/host.rb
Overview
Host of SSHGroup
Instance Attribute Summary collapse
-
#bastion ⇒ Object
readonly
Returns the value of attribute bastion.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(host) ⇒ Host
constructor
A new instance of Host.
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
#bastion ⇒ Object (readonly)
Returns the value of attribute bastion.
6 7 8 |
# File 'lib/seijaku/ssh/host.rb', line 6 def bastion @bastion end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/seijaku/ssh/host.rb', line 6 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
6 7 8 |
# File 'lib/seijaku/ssh/host.rb', line 6 def port @port end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'lib/seijaku/ssh/host.rb', line 6 def user @user end |