Class: CMDx::Configuration
- Inherits:
-
Object
- Object
- CMDx::Configuration
- Defined in:
- lib/cmdx/configuration.rb
Overview
Global defaults used by every task unless the task overrides via
Task.settings/register DSL. A fresh Task subclass inherits the current
configuration's registries (via #dup) at the time its accessor is first
called, so changes to configuration only apply to tasks that haven't
cached their copy yet.
Instance Attribute Summary collapse
-
#backtrace_cleaner ⇒ Object
Returns the value of attribute backtrace_cleaner.
-
#callbacks ⇒ Object
Returns the value of attribute callbacks.
-
#coercions ⇒ Object
Returns the value of attribute coercions.
-
#correlation_id ⇒ Object
Returns the value of attribute correlation_id.
-
#default_locale ⇒ Object
Returns the value of attribute default_locale.
-
#deprecators ⇒ Object
Returns the value of attribute deprecators.
-
#executors ⇒ Object
Returns the value of attribute executors.
-
#limiters ⇒ Object
Returns the value of attribute limiters.
-
#log_exclusions ⇒ Object
Returns the value of attribute log_exclusions.
-
#log_formatter ⇒ Object
Returns the value of attribute log_formatter.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#mergers ⇒ Object
Returns the value of attribute mergers.
-
#middlewares ⇒ Object
Returns the value of attribute middlewares.
-
#retriers ⇒ Object
Returns the value of attribute retriers.
-
#store ⇒ Object
Returns the value of attribute store.
-
#strict_context ⇒ Object
Returns the value of attribute strict_context.
-
#telemetry ⇒ Object
Returns the value of attribute telemetry.
-
#validators ⇒ Object
Returns the value of attribute validators.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cmdx/configuration.rb', line 17 def initialize @middlewares = Middlewares.new @callbacks = Callbacks.new @coercions = Coercions.new @validators = Validators.new @executors = Executors.new @mergers = Mergers.new @retriers = Retriers.new @limiters = Limiters.new @deprecators = Deprecators.new @telemetry = Telemetry.new @store = Stores::Memory.new @correlation_id = nil @default_locale = "en" @strict_context = false @backtrace_cleaner = nil @log_exclusions = EMPTY_ARRAY @log_formatter = nil @log_level = nil @logger = Logger.new( $stdout, progname: "cmdx", formatter: LogFormatters::Line.new, level: Logger::INFO ) end |
Instance Attribute Details
#backtrace_cleaner ⇒ Object
Returns the value of attribute backtrace_cleaner.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def backtrace_cleaner @backtrace_cleaner end |
#callbacks ⇒ Object
Returns the value of attribute callbacks.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def callbacks @callbacks end |
#coercions ⇒ Object
Returns the value of attribute coercions.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def coercions @coercions end |
#correlation_id ⇒ Object
Returns the value of attribute correlation_id.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def correlation_id @correlation_id end |
#default_locale ⇒ Object
Returns the value of attribute default_locale.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def default_locale @default_locale end |
#deprecators ⇒ Object
Returns the value of attribute deprecators.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def deprecators @deprecators end |
#executors ⇒ Object
Returns the value of attribute executors.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def executors @executors end |
#limiters ⇒ Object
Returns the value of attribute limiters.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def limiters @limiters end |
#log_exclusions ⇒ Object
Returns the value of attribute log_exclusions.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def log_exclusions @log_exclusions end |
#log_formatter ⇒ Object
Returns the value of attribute log_formatter.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def log_formatter @log_formatter end |
#log_level ⇒ Object
Returns the value of attribute log_level.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def logger @logger end |
#mergers ⇒ Object
Returns the value of attribute mergers.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def mergers @mergers end |
#middlewares ⇒ Object
Returns the value of attribute middlewares.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def middlewares @middlewares end |
#retriers ⇒ Object
Returns the value of attribute retriers.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def retriers @retriers end |
#store ⇒ Object
Returns the value of attribute store.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def store @store end |
#strict_context ⇒ Object
Returns the value of attribute strict_context.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def strict_context @strict_context end |
#telemetry ⇒ Object
Returns the value of attribute telemetry.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def telemetry @telemetry end |
#validators ⇒ Object
Returns the value of attribute validators.
12 13 14 |
# File 'lib/cmdx/configuration.rb', line 12 def validators @validators end |