Class: Acclimate::Configuration
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Acclimate::Configuration
- Defined in:
- lib/acclimate/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.config_filepath ⇒ Object
12 13 |
# File 'lib/acclimate/configuration.rb', line 12 def self.config_filepath end |
.load(options = {}) ⇒ Object
8 9 10 |
# File 'lib/acclimate/configuration.rb', line 8 def self.load( ={} ) new( .merge( )) end |
Instance Method Details
#config_filepath ⇒ Object
15 16 17 |
# File 'lib/acclimate/configuration.rb', line 15 def config_filepath Pathname.new( self.class.config_filepath ) end |
#for_env ⇒ Object
23 24 25 26 |
# File 'lib/acclimate/configuration.rb', line 23 def for_env return Hashie::Mash.new({}) unless env self[env] end |
#slice(*keys) ⇒ Object
19 20 21 |
# File 'lib/acclimate/configuration.rb', line 19 def slice( *keys ) klass.new( select { |k,v| keys.map( &:to_s ).include?( k ) } ) end |