Class: Guacamole::Configuration::ConfigStruct
- Inherits:
-
Object
- Object
- Guacamole::Configuration::ConfigStruct
- Defined in:
- lib/guacamole/configuration.rb
Overview
A wrapper object to handle both configuration from a connection URI and a hash.
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(config_hash_or_url) ⇒ ConfigStruct
constructor
A new instance of ConfigStruct.
Constructor Details
#initialize(config_hash_or_url) ⇒ ConfigStruct
Returns a new instance of ConfigStruct.
76 77 78 79 80 81 82 83 |
# File 'lib/guacamole/configuration.rb', line 76 def initialize(config_hash_or_url) case config_hash_or_url when Hash init_from_hash(config_hash_or_url) when String init_from_uri_string(config_hash_or_url) end end |
Instance Attribute Details
#database ⇒ Object (readonly)
Returns the value of attribute database.
74 75 76 |
# File 'lib/guacamole/configuration.rb', line 74 def database @database end |
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
74 75 76 |
# File 'lib/guacamole/configuration.rb', line 74 def graph @graph end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
74 75 76 |
# File 'lib/guacamole/configuration.rb', line 74 def password @password end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
74 75 76 |
# File 'lib/guacamole/configuration.rb', line 74 def url @url end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
74 75 76 |
# File 'lib/guacamole/configuration.rb', line 74 def username @username end |