Class: Eventsimple::Configuration
- Inherits:
-
Object
- Object
- Eventsimple::Configuration
- Defined in:
- lib/eventsimple/configuration.rb
Instance Attribute Summary collapse
-
#max_concurrency_retries ⇒ Object
Returns the value of attribute max_concurrency_retries.
- #metadata_klass ⇒ Object
- #parent_record_klass ⇒ Object
-
#retry_reactor_on_record_not_found ⇒ Object
Returns the value of attribute retry_reactor_on_record_not_found.
-
#ui_visible_models ⇒ Object
Returns the value of attribute ui_visible_models.
Instance Method Summary collapse
-
#dispatchers ⇒ Object
rubocop:disable Naming/MemoizedInstanceVariableName.
- #dispatchers=(value) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 |
# File 'lib/eventsimple/configuration.rb', line 12 def initialize @dispatchers = [] @max_concurrency_retries = 2 @metadata_klass = 'Eventsimple::Metadata' @parent_record_klass = 'ApplicationRecord' @retry_reactor_on_record_not_found = false @ui_visible_models = [] # internal use only end |
Instance Attribute Details
#max_concurrency_retries ⇒ Object
Returns the value of attribute max_concurrency_retries.
5 6 7 |
# File 'lib/eventsimple/configuration.rb', line 5 def max_concurrency_retries @max_concurrency_retries end |
#metadata_klass ⇒ Object
41 42 43 |
# File 'lib/eventsimple/configuration.rb', line 41 def @metadata_klass_const ||= @metadata_klass.constantize end |
#parent_record_klass ⇒ Object
45 46 47 |
# File 'lib/eventsimple/configuration.rb', line 45 def parent_record_klass @parent_record_const ||= @parent_record_klass.constantize end |
#retry_reactor_on_record_not_found ⇒ Object
Returns the value of attribute retry_reactor_on_record_not_found.
8 9 10 |
# File 'lib/eventsimple/configuration.rb', line 8 def retry_reactor_on_record_not_found @retry_reactor_on_record_not_found end |
#ui_visible_models ⇒ Object
Returns the value of attribute ui_visible_models.
10 11 12 |
# File 'lib/eventsimple/configuration.rb', line 10 def ui_visible_models @ui_visible_models end |
Instance Method Details
#dispatchers ⇒ Object
rubocop:disable Naming/MemoizedInstanceVariableName
37 38 39 |
# File 'lib/eventsimple/configuration.rb', line 37 def dispatchers @dispatchers_klass_consts ||= @dispatchers.map(&:constantize) end |
#dispatchers=(value) ⇒ Object
30 31 32 33 34 |
# File 'lib/eventsimple/configuration.rb', line 30 def dispatchers=(value) raise ArgumentError, 'dispatchers must be an array' unless value.is_a?(Array) @dispatchers = value end |