Class: Schai::CLI
- Inherits:
-
Thor
- Object
- Thor
- Schai::CLI
- Defined in:
- lib/schai/cli.rb
Instance Method Summary collapse
Instance Method Details
#gen ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/schai/cli.rb', line 15 def gen schai = Schai.parse_file [:yaml] json = JSON.pretty_generate(schai.to_schema) if dist_file = [:to] File.open(dist_file, "w") {|f| f.puts json} else puts json end end |
#hello ⇒ Object
8 9 10 |
# File 'lib/schai/cli.rb', line 8 def hello puts "Hello World!" end |