Class: OpenAPIParser::SchemaLoader
- Inherits:
-
Object
- Object
- OpenAPIParser::SchemaLoader
- 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
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
-
#initialize(target_object, core) ⇒ SchemaLoader
constructor
A new instance of SchemaLoader.
-
#load_data ⇒ Array<OpenAPIParser::Schemas::Base>
execute load data return data is equal to :children.
Constructor Details
#initialize(target_object, core) ⇒ SchemaLoader
Returns a new instance of SchemaLoader.
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
#children ⇒ Object (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_data ⇒ Array<OpenAPIParser::Schemas::Base>
execute load data return data is equal to :children
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 |