class Schai::CLI

Public Instance Methods

gen() click to toggle source
# File lib/schai/cli.rb, line 15
def gen
  schai = Schai.parse_file options[:yaml]

  json = JSON.pretty_generate(schai.to_schema)
  if dist_file = options[:to]
    File.open(dist_file, "w") {|f| f.puts json}
  else
    puts json
  end
end
hello() click to toggle source
# File lib/schai/cli.rb, line 8
def hello
  puts "Hello World!"
end