Class: Mammoth::DeadLetterCommands
- Inherits:
-
Object
- Object
- Mammoth::DeadLetterCommands
- Defined in:
- lib/mammoth/dead_letter_commands.rb
Overview
Operator commands for inspecting and replaying dead letters. rubocop:disable Metrics/ClassLength
Defined Under Namespace
Classes: DEAD_LETTER_TRANSACTION_ENVELOPE
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
Class Method Summary collapse
Instance Method Summary collapse
-
#call ⇒ Integer
Dispatch the nested dead-letter subcommand.
-
#initialize(argv) ⇒ DeadLetterCommands
constructor
A new instance of DeadLetterCommands.
Constructor Details
#initialize(argv) ⇒ DeadLetterCommands
Returns a new instance of DeadLetterCommands.
28 29 30 |
# File 'lib/mammoth/dead_letter_commands.rb', line 28 def initialize(argv) @argv = argv end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
20 21 22 |
# File 'lib/mammoth/dead_letter_commands.rb', line 20 def argv @argv end |
Class Method Details
.call(argv) ⇒ Object
23 24 25 |
# File 'lib/mammoth/dead_letter_commands.rb', line 23 def self.call(argv) new(argv).call end |
Instance Method Details
#call ⇒ Integer
Dispatch the nested dead-letter subcommand.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mammoth/dead_letter_commands.rb', line 35 def call case command when "list" then list when "show" then show when "replay" then replay else raise ConfigurationError, "dead-letters subcommand required\n#{CLI::USAGE}" end rescue Mammoth::Error => e warn e. 1 end |