Class: Legion::CLI::Debug
- Inherits:
-
Thor
- Object
- Thor
- Legion::CLI::Debug
- Defined in:
- lib/legion/cli/debug_command.rb
Constant Summary collapse
- DEBUG_DIR =
File.('~/.legionio/debug')
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
14 15 16 |
# File 'lib/legion/cli/debug_command.rb', line 14 def self.exit_on_failure? true end |
Instance Method Details
#dump ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/legion/cli/debug_command.rb', line 26 def dump sections = collect_all_sections output = if [:json] ::JSON.pretty_generate(sections) else build_markdown(sections) end puts output path = write_dump_file(output) warn "Saved to #{path}" if path end |