Module: CobraCommander::Output::MarkdownPrinter
- Defined in:
- lib/cobra_commander/output/markdown_printer.rb
Overview
Prints the given CobraCommander::Executor::Context to [output] collection in markdown
Constant Summary collapse
- SUCCESS =
"\n## ✔ %s\n".freeze
- ERROR =
"\n## ✖ %s\n".freeze
- OUTPUT =
"\n```\n$ %s\n\n%s\n```\n".freeze
Class Method Summary collapse
Class Method Details
.run(contexts, output) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/cobra_commander/output/markdown_printer.rb', line 14 def self.run(contexts, output) contexts.each do |context| template = context.success? ? SUCCESS : ERROR output.print format(template, context.component_name) output.print format(OUTPUT, context.command, context.output) end end |