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.



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

def props
  @props
end

Class Method Details

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

Yields:



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

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:

    • location of the property to obtain

Returns:



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

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