Class: RSMP::SchemaCLI
- Inherits:
-
Thor
- Object
- Thor
- RSMP::SchemaCLI
- Defined in:
- lib/rsmp/cli.rb
Overview
CLI subcommands for SXL schema operations.
Instance Method Summary collapse
Instance Method Details
#generate ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rsmp/cli.rb', line 11 def generate input = [:in] output = [:out] unless File.exist?(input) puts "Error: Input file #{input} not found" exit 1 end sxl = RSMP::Convert::Import::YAML.read(input) RSMP::Convert::Export::JSONSchema.write(sxl, output) end |