Class: OpenAPIParser::SchemaLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_parser/concerns/schema_loader.rb,
lib/openapi_parser/concerns/schema_loader.rb

Overview

load data to target_object by schema definition in core

Defined Under Namespace

Classes: Base, Creator, HashBodyLoader, HashObjectsLoader, ListLoader, ObjectsLoader, ValuesLoader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_object, core) ⇒ SchemaLoader

Returns a new instance of SchemaLoader.

Parameters:



16
17
18
19
20
# File 'lib/openapi_parser/concerns/schema_loader.rb', line 16

def initialize(target_object, core)
  @target_object = target_object
  @core = core
  @children = {}
end

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



24
25
26
# File 'lib/openapi_parser/concerns/schema_loader.rb', line 24

def children
  @children
end

Instance Method Details

#load_dataArray<OpenAPIParser::Schemas::Base>

execute load data return data is equal to :children

Returns:



29
30
31
32
# File 'lib/openapi_parser/concerns/schema_loader.rb', line 29

def load_data
  all_loader.each { |l| load_data_by_schema_loader(l) }
  children
end