Class: Mammoth::Commands::DeadLettersCommand
- Inherits:
-
Object
- Object
- Mammoth::Commands::DeadLettersCommand
- Defined in:
- lib/mammoth/commands/dead_letters_command.rb
Overview
Reusable local command object for dead-letter inspection and replay.
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#lifecycle_hooks ⇒ Object
readonly
Returns the value of attribute lifecycle_hooks.
-
#state_adapter ⇒ Object
readonly
Returns the value of attribute state_adapter.
Instance Method Summary collapse
-
#call ⇒ Integer
Process-style status code.
-
#initialize(argv, state_adapter: nil, lifecycle_hooks: LifecycleHooks.new) ⇒ DeadLettersCommand
constructor
A new instance of DeadLettersCommand.
Constructor Details
#initialize(argv, state_adapter: nil, lifecycle_hooks: LifecycleHooks.new) ⇒ DeadLettersCommand
Returns a new instance of DeadLettersCommand.
12 13 14 15 16 |
# File 'lib/mammoth/commands/dead_letters_command.rb', line 12 def initialize(argv, state_adapter: nil, lifecycle_hooks: LifecycleHooks.new) @argv = argv @state_adapter = state_adapter @lifecycle_hooks = lifecycle_hooks end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
7 8 9 |
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7 def argv @argv end |
#lifecycle_hooks ⇒ Object (readonly)
Returns the value of attribute lifecycle_hooks.
7 8 9 |
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7 def lifecycle_hooks @lifecycle_hooks end |
#state_adapter ⇒ Object (readonly)
Returns the value of attribute state_adapter.
7 8 9 |
# File 'lib/mammoth/commands/dead_letters_command.rb', line 7 def state_adapter @state_adapter end |
Instance Method Details
#call ⇒ Integer
Returns process-style status code.
19 20 21 |
# File 'lib/mammoth/commands/dead_letters_command.rb', line 19 def call DeadLetterCommands.call(argv, state_adapter: state_adapter, lifecycle_hooks: lifecycle_hooks) end |