Class: Opsworks::Ssh::Config::Server
- Inherits:
-
Object
- Object
- Opsworks::Ssh::Config::Server
- Defined in:
- lib/opsworks/ssh/config/server.rb
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#initialize(instance: nil) ⇒ Server
constructor
A new instance of Server.
- #ip ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(instance: nil) ⇒ Server
Returns a new instance of Server.
5 6 7 |
# File 'lib/opsworks/ssh/config/server.rb', line 5 def initialize(instance: nil) @instance = instance end |
Instance Method Details
#active? ⇒ Boolean
17 18 19 |
# File 'lib/opsworks/ssh/config/server.rb', line 17 def active? !ip.nil? end |
#ip ⇒ Object
13 14 15 |
# File 'lib/opsworks/ssh/config/server.rb', line 13 def ip @instance.private_ip end |
#name ⇒ Object
9 10 11 |
# File 'lib/opsworks/ssh/config/server.rb', line 9 def name @instance.hostname end |