Class: ConstantContact::Util::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/constantcontact/util/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.propsObject

Returns the value of attribute props



148
149
150
# File 'lib/constantcontact/util/config.rb', line 148

def props
  @props
end

Class Method Details

.configure {|props| ... } ⇒ Object

Yields:



150
151
152
# File 'lib/constantcontact/util/config.rb', line 150

def configure 
  yield props if block_given?
end

.get(index) ⇒ String

Get a configuration property given a specified location, example usage: Config::get('auth.token_endpoint')

Parameters:

  • index (String)
    • location of the property to obtain

Returns:

  • (String)


157
158
159
160
# File 'lib/constantcontact/util/config.rb', line 157

def get(index)
  properties = index.split('.')
  get_value(properties, props)
end