Class: Guacamole::Configuration::ConfigStruct

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#databaseObject (readonly)

Returns the value of attribute database.



74
75
76
# File 'lib/guacamole/configuration.rb', line 74

def database
  @database
end

#graphObject (readonly)

Returns the value of attribute graph.



74
75
76
# File 'lib/guacamole/configuration.rb', line 74

def graph
  @graph
end

#passwordObject (readonly)

Returns the value of attribute password.



74
75
76
# File 'lib/guacamole/configuration.rb', line 74

def password
  @password
end

#urlObject (readonly)

Returns the value of attribute url.



74
75
76
# File 'lib/guacamole/configuration.rb', line 74

def url
  @url
end

#usernameObject (readonly)

Returns the value of attribute username.



74
75
76
# File 'lib/guacamole/configuration.rb', line 74

def username
  @username
end