Class: Pot::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/pot/instance.rb

Constant Summary collapse

REGISTER =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, host, options = {}) ⇒ Instance

Returns a new instance of Instance.



11
12
13
14
15
16
17
18
19
# File 'lib/pot/instance.rb', line 11

def initialize(name, host, options = {})
  @name = name
  @host = host
  @user = options[:user]
  @password = options[:password]
  @port = options[:port]

  REGISTER[name] = self
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



5
6
7
# File 'lib/pot/instance.rb', line 5

def host
  @host
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/pot/instance.rb', line 5

def name
  @name
end

#passwordObject (readonly)

Returns the value of attribute password.



5
6
7
# File 'lib/pot/instance.rb', line 5

def password
  @password
end

#portObject (readonly)

Returns the value of attribute port.



5
6
7
# File 'lib/pot/instance.rb', line 5

def port
  @port
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'lib/pot/instance.rb', line 5

def user
  @user
end