Class: ShipHero::Util::Config
- Inherits:
-
Object
- Object
- ShipHero::Util::Config
- Defined in:
- lib/ship_hero/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.
51 52 53 |
# File 'lib/ship_hero/util/config.rb', line 51 def props @props end |
Class Method Details
.configure {|props| ... } ⇒ Object
53 54 55 |
# File 'lib/ship_hero/util/config.rb', line 53 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’)
60 61 62 63 |
# File 'lib/ship_hero/util/config.rb', line 60 def get(index) properties = index.split('.') get_value(properties, props) end |