Class: RuboCop::Schema::Generator

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/rubocop/schema/generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#boolean, #deep_dup, #deep_merge, #http_get, #strip_html, #template, templates

Constructor Details

#initialize(specs, document_loader) ⇒ Generator

Returns a new instance of Generator.

Parameters:



20
21
22
23
24
25
26
# File 'lib/rubocop/schema/generator.rb', line 20

def initialize(specs, document_loader)
  @specs  = specs
  @loader = document_loader
  @schema = template('schema')
  @props  = @schema.fetch('properties')
  generate
end

Instance Attribute Details

#schemaObject (readonly)

Returns Hash.

Returns:

  • Hash



16
17
18
# File 'lib/rubocop/schema/generator.rb', line 16

def schema
  @schema
end