Class: ServerDensity::Client
- Inherits:
-
Object
- Object
- ServerDensity::Client
- Defined in:
- lib/server_density.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #servers ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/server_density.rb', line 8 def initialize(={}) valid = [:username, :password, :account].all? { |param| [param] != nil && [param] != '' } unless valid puts "ERROR" # TODO polish exit(1) end @username = [:username] @password = [:password] @account = [:account] end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
7 8 9 |
# File 'lib/server_density.rb', line 7 def account @account end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
7 8 9 |
# File 'lib/server_density.rb', line 7 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
7 8 9 |
# File 'lib/server_density.rb', line 7 def username @username end |
Instance Method Details
#servers ⇒ Object
19 20 21 |
# File 'lib/server_density.rb', line 19 def servers @servers ||= Servers.new(self) end |