Class: SnippetCli::Commands::Info
- Inherits:
-
SnippetCli::Command
- Object
- SnippetCli::Command
- SnippetCli::Commands::Info
- Defined in:
- lib/snippet_cli/commands/info.rb
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(docs, options) ⇒ Info
constructor
A new instance of Info.
- #show_banner ⇒ Object
Methods inherited from SnippetCli::Command
#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which
Constructor Details
#initialize(docs, options) ⇒ Info
Returns a new instance of Info.
10 11 12 13 |
# File 'lib/snippet_cli/commands/info.rb', line 10 def initialize(docs, ) @docs = docs @options = end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/snippet_cli/commands/info.rb', line 15 def execute(input: $stdin, output: $stdout) def () box = TTY::Box::frame(width:67, height:11, border: :thick, align: :left) do " ##### # # ### ###### ###### ####### ####### # # ## # # # # # # # # # # # # # # # # # # # ##### # # # # ###### ###### ##### # # # # # # # # # # # # # ## # # # # # ##### # # ### # # ####### # CLI " end puts box end puts () parsed_markdown=TTY::Markdown.parse_file('/snippet_cli/commands/info.md') output.puts parsed_markdown end |
#show_banner ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/snippet_cli/commands/info.rb', line 16 def () box = TTY::Box::frame(width:67, height:11, border: :thick, align: :left) do " ##### # # ### ###### ###### ####### ####### # # ## # # # # # # # # # # # # # # # # # # # ##### # # # # ###### ###### ##### # # # # # # # # # # # # # ## # # # # # ##### # # ### # # ####### # CLI " end puts box end |