Class: Rigger::Server
- Inherits:
-
Struct
- Object
- Struct
- Rigger::Server
- Defined in:
- lib/rigger/server.rb
Instance Attribute Summary collapse
-
#connection_string ⇒ Object
Returns the value of attribute connection_string.
-
#options ⇒ Object
Returns the value of attribute options.
-
#role ⇒ Object
Returns the value of attribute role.
Instance Method Summary collapse
Instance Attribute Details
#connection_string ⇒ Object
Returns the value of attribute connection_string
2 3 4 |
# File 'lib/rigger/server.rb', line 2 def connection_string @connection_string end |
#options ⇒ Object
Returns the value of attribute options
2 3 4 |
# File 'lib/rigger/server.rb', line 2 def @options end |
#role ⇒ Object
Returns the value of attribute role
2 3 4 |
# File 'lib/rigger/server.rb', line 2 def role @role end |
Instance Method Details
#connection ⇒ Object
3 4 5 |
# File 'lib/rigger/server.rb', line 3 def connection @connection ||= Net::SSH.start(host, user) end |
#host ⇒ Object
7 8 9 |
# File 'lib/rigger/server.rb', line 7 def host connection_string.split("@").last end |
#user ⇒ Object
11 12 13 |
# File 'lib/rigger/server.rb', line 11 def user connection_string.split("@").first end |