Class: Crowdskout::Util::Config
- Inherits:
-
Object
- Object
- Crowdskout::Util::Config
- Defined in:
- lib/crowdskout/util/config.rb
Class Attribute Summary collapse
-
.props ⇒ Object
Returns the value of attribute props.
Class Method Summary collapse
- .configure {|props| ... } ⇒ Object
-
.get(index) ⇒ String
Get a configuration property given a specified location, example usage: Config::get(‘auth.token_endpoint’).
Class Attribute Details
.props ⇒ Object
Returns the value of attribute props.
54 55 56 |
# File 'lib/crowdskout/util/config.rb', line 54 def props @props end |
Class Method Details
.configure {|props| ... } ⇒ Object
56 57 58 |
# File 'lib/crowdskout/util/config.rb', line 56 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’)
63 64 65 66 |
# File 'lib/crowdskout/util/config.rb', line 63 def get(index) properties = index.split('.') get_value(properties, props) end |