Class: Schai::CLI

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

Instance Method Summary collapse

Instance Method Details

#genObject



15
16
17
18
19
20
21
22
23
24
# 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

#helloObject



8
9
10
# File 'lib/schai/cli.rb', line 8

def hello
  puts "Hello World!"
end