class Kojo::Commands::FormCmd

Handle calls to the +kojo form+ command

Attributes

infile[R]
outdir[R]

Public Instance Methods

run() click to toggle source
# File lib/kojo/commands/form.rb, line 21
def run
  infile = args['INFILE']
  outfile = args['--save']
  template = Kojo::Form.new infile
  
  if outfile
    save outfile, template.render
  else
    puts template.render 
  end
end