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.
50 51 52 |
# File 'lib/crowdskout/util/config.rb', line 50 def props @props end |
Class Method Details
.configure {|props| ... } ⇒ Object
52 53 54 |
# File 'lib/crowdskout/util/config.rb', line 52 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’)
59 60 61 62 |
# File 'lib/crowdskout/util/config.rb', line 59 def get(index) properties = index.split('.') get_value(properties, props) end |