Class: MultipleMan::Configuration
- Inherits:
-
Object
- Object
- MultipleMan::Configuration
- Defined in:
- lib/multiple_man/configuration.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#channel_pool_size ⇒ Object
Returns the value of attribute channel_pool_size.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#error_handler ⇒ Object
Returns the value of attribute error_handler.
- #logger ⇒ Object
-
#topic_name ⇒ Object
Returns the value of attribute topic_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #on_error(&block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
4 5 6 7 8 9 |
# File 'lib/multiple_man/configuration.rb', line 4 def initialize self.topic_name = "multiple_man" self.app_name = Rails.application.class.parent.to_s if defined?(Rails) self.enabled = true self.channel_pool_size = 5 end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def app_name @app_name end |
#channel_pool_size ⇒ Object
Returns the value of attribute channel_pool_size.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def channel_pool_size @channel_pool_size end |
#connection ⇒ Object
Returns the value of attribute connection.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def connection @connection end |
#enabled ⇒ Object
Returns the value of attribute enabled.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def enabled @enabled end |
#error_handler ⇒ Object
Returns the value of attribute error_handler.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def error_handler @error_handler end |
#logger ⇒ Object
11 12 13 |
# File 'lib/multiple_man/configuration.rb', line 11 def logger @logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDOUT) end |
#topic_name ⇒ Object
Returns the value of attribute topic_name.
19 20 21 |
# File 'lib/multiple_man/configuration.rb', line 19 def topic_name @topic_name end |
Instance Method Details
#on_error(&block) ⇒ Object
15 16 17 |
# File 'lib/multiple_man/configuration.rb', line 15 def on_error(&block) @error_handler = block end |