Class: Rigger::Server

Inherits:
Struct
  • Object
show all
Defined in:
lib/rigger/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connection_stringObject

Returns the value of attribute connection_string

Returns:

  • (Object)

    the current value of connection_string



2
3
4
# File 'lib/rigger/server.rb', line 2

def connection_string
  @connection_string
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



2
3
4
# File 'lib/rigger/server.rb', line 2

def options
  @options
end

#roleObject

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



2
3
4
# File 'lib/rigger/server.rb', line 2

def role
  @role
end

Instance Method Details

#connectionObject



3
4
5
# File 'lib/rigger/server.rb', line 3

def connection
  @connection ||= Net::SSH.start(host, user)
end

#hostObject



7
8
9
# File 'lib/rigger/server.rb', line 7

def host
  connection_string.split("@").last
end

#userObject



11
12
13
# File 'lib/rigger/server.rb', line 11

def user
  connection_string.split("@").first
end