Class: Asynk::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/asynk/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/asynk/config.rb', line 4

def initialize
  @params = {
                  mq_exchange: 'asynk_exchange_topic',
    sync_publish_wait_timeout: 10,
 default_consumer_concurrency: 1,
                 default_sync: false,
                    daemonize: false,
                      logfile: 'log/asynk.log',
                      pidifle: 'tmp/pids/asynk.pid',
                      mq_host: 'localhost',
                      mq_port: 5672,
                     mq_vhost: '/',
                  mq_username: 'guest',
                  mq_password: 'guest',
      publisher_execution_time: true,
   respond_back_execution_time: true,
            ignored_consumers: []
  }
end

Instance Method Details

#[](key) ⇒ Object



24
25
26
# File 'lib/asynk/config.rb', line 24

def [](key)
  @params[key]
end

#[]=(key, value) ⇒ Object



28
29
30
# File 'lib/asynk/config.rb', line 28

def []=(key, value)
  @params[key] = value
end