Class: Formdown::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/formdown/cli.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



6
7
8
9
10
11
12
# File 'lib/formdown/cli.rb', line 6

def render
  if $stdin.tty?
    error "Pipe Formdown into this command. Example: `$ echo 'Email: ____@(Email)' | formdown render`"
  else
    puts Formdown::Renderer.new($stdin.read).to_html 
  end
end