Class: OpenAPIParser::SchemaLoader::ObjectsLoader

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

Overview

Specific Object loader (defined by klass option)

Instance Method Summary collapse

Methods inherited from Creator

#initialize

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from OpenAPIParser::SchemaLoader::Creator

Instance Method Details

#load_data(target_object, raw_schema) ⇒ Array<OpenAPIParser::Schemas::Base>?

Parameters:

Returns:



6
7
8
9
# File 'lib/openapi_parser/concerns/schema_loader/objects_loader.rb', line 6

def load_data(target_object, raw_schema)
  obj = create_attr_object(target_object, raw_schema[schema_key.to_s])
  [obj]
end