Class: SnippetCli::Commands::Info

Inherits:
SnippetCli::Command show all
Defined in:
lib/snippet_cli/commands/info.rb

Instance Method Summary collapse

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, options)
  @docs = docs
  @options = 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 show_banner()
  box = TTY::Box::frame(width:67, height:11, border: :thick, align: :left) do 
  "
  #####   #     # ### ######  ######  ####### ####### 
  #     # ##    #  #  #     # #     # #          #    
  #       # #   #  #  #     # #     # #          #    
   #####  #  #  #  #  ######  ######  #####      #    
        # #   # #  #  #       #       #          #    
  #     # #    ##  #  #       #       #          #    
   #####  #     # ### #       #       #######    #    CLI                                                                
  "
  end
  puts box
end
  puts show_banner()
  parsed_markdown=TTY::Markdown.parse_file('/snippet_cli/commands/info.md')
  output.puts parsed_markdown
end

#show_bannerObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/snippet_cli/commands/info.rb', line 16

def show_banner()
  box = TTY::Box::frame(width:67, height:11, border: :thick, align: :left) do 
  "
  #####   #     # ### ######  ######  ####### ####### 
  #     # ##    #  #  #     # #     # #          #    
  #       # #   #  #  #     # #     # #          #    
   #####  #  #  #  #  ######  ######  #####      #    
        # #   # #  #  #       #       #          #    
  #     # #    ##  #  #       #       #          #    
   #####  #     # ### #       #       #######    #    CLI                                                                
  "
  end
  puts box
end