Class: Boxxspring::Worker::Configuration

Inherits:
Abstract
  • Object
show all
Includes:
Singleton
Defined in:
lib/boxxspring/worker/configuration.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

#method_missing, #to_hash

Constructor Details

#initializeConfiguration

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

Returns:

  • (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