Method: Jdoc::Generator#initialize

Defined in:
lib/jdoc/generator.rb

#initialize(schema, html: false, html_template_path: nil, markdown_template_path: nil) ⇒ Generator

Returns a new instance of Generator.

Parameters:

  • schema (Hash)

    JSON Schema represented as a Hash

  • html (true, false) (defaults to: false)

    Pass true to render HTML docs

  • html_template_path (String) (defaults to: nil)

    Path to ERB template to render HTML

  • Markdown_template_path (String)

    Path to ERB template to render Markdown



16
17
18
19
20
21
# File 'lib/jdoc/generator.rb', line 16

def initialize(schema, html: false, html_template_path: nil, markdown_template_path: nil)
  @raw_schema = schema
  @html = html
  @html_template_path = html_template_path
  @markdown_template_path = markdown_template_path
end