module Nidyx::Generator

Public Instance Methods

run(schema_path, options) click to toggle source

The Nidyx model generator. Called by the Nidyx CLI. Parses the input schema, creates models and writes them to the output directory. @param schema_path [String] Path to the schema to generate models with. @param options [Hash] Model generation options hash.

# File lib/nidyx/generator.rb, line 14
def run(schema_path, options)
  schema = Nidyx::Reader.read(schema_path)
  raw_models = Nidyx::Parser.parse(schema, options)
  models = Nidyx::Mapper.map(raw_models, options)
  Nidyx::Output.write(models, options[:output_directory])
end