Module: AdobeConnect::Config
- Defined in:
- lib/adobe_connect/config.rb
Overview
Public: Manage configuration for AdobeConnect::Service objects, like username/password/domain.
Class Method Summary collapse
-
.[](key) ⇒ Object
Public: Fetch a single key value from the current settings.
-
.[]=(key, value) ⇒ Object
Public: Set a single key’s value.
-
.declare(&block) ⇒ Object
Public: Declare default Connect settings using a block.
-
.merge(settings) ⇒ Object
Public: Merge the given settings hash into the current settings.
-
.settings ⇒ Object
Public: Getter for the internal settings hash.
Class Method Details
.[](key) ⇒ Object
Public: Fetch a single key value from the current settings.
key - The key to fetch.
Examples
AdobeConnect::Config #=> ‘[email protected]’
Returns the value of the key (usually a string).
45 46 47 |
# File 'lib/adobe_connect/config.rb', line 45 def [](key) @settings[key] end |
.[]=(key, value) ⇒ Object
Public: Set a single key’s value.
key - The name of the key to set. value - The value to set the key to.
Examples
AdobeConnect::Config = ‘[email protected]’
Returns nothing.
59 60 61 |
# File 'lib/adobe_connect/config.rb', line 59 def []=(key, value) @settings[key] = value end |
.declare(&block) ⇒ Object
Public: Declare default Connect settings using a block.
&block - A block with configuration options.
Examples
AdobeConnect::Config.declare do username ‘[email protected]’ password ‘password’ domain ‘connect.example.com’ end
Returns nothing.
32 33 34 |
# File 'lib/adobe_connect/config.rb', line 32 def declare(&block) instance_eval(&block) end |
.merge(settings) ⇒ Object
Public: Merge the given settings hash into the current settings.
settings - A hash of setting options.
Returns nothing.
15 16 17 |
# File 'lib/adobe_connect/config.rb', line 15 def merge(settings) @settings.merge(settings) end |
.settings ⇒ Object
Public: Getter for the internal settings hash.
Returns a hash.
66 |
# File 'lib/adobe_connect/config.rb', line 66 def settings; @settings; end |