Class: Boxxspring::Worker::Configuration
- Includes:
- Singleton
- Defined in:
- lib/boxxspring/worker/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
- #from_hash(configuration) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Methods inherited from Abstract
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 25 |
# File 'lib/boxxspring/worker/configuration.rb', line 20 def initialize super( { env: ENV[ 'WORKERS_ENV' ] || 'development', logger: Logger.new( STDOUT ) } ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Boxxspring::Abstract
Class Method Details
.reloadable? ⇒ Boolean
27 28 29 |
# File 'lib/boxxspring/worker/configuration.rb', line 27 def self.reloadable? false end |
Instance Method Details
#from_hash(configuration) ⇒ Object
31 32 33 34 35 |
# File 'lib/boxxspring/worker/configuration.rb', line 31 def from_hash( configuration ) configuration.each_pair do | name, value | self.send( "@#{name}", value ) end end |