Class: OpenAPIParser::Schemas::Base

Inherits:
Object
  • Object
show all
Includes:
Expandable, Findable, Parser
Defined in:
lib/openapi_parser/schemas/base.rb,
lib/openapi_parser/schemas/classes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Expandable

#expand_reference

Methods included from Findable

#find_object, #purge_object_cache

Methods included from Parser

#_openapi_all_child_objects, #_update_child_object, included, #load_data

Constructor Details

#initialize(object_reference, parent, root, raw_schema) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
18
# File 'lib/openapi_parser/schemas/base.rb', line 10

def initialize(object_reference, parent, root, raw_schema)
  @raw_schema = raw_schema
  @parent = parent
  @root = root
  @object_reference = object_reference

  load_data
  after_init
end

Instance Attribute Details

#object_referenceObject (readonly)

Returns the value of attribute object_reference.



7
8
9
# File 'lib/openapi_parser/schemas/base.rb', line 7

def object_reference
  @object_reference
end

#parentObject (readonly)

Returns the value of attribute parent.



7
8
9
# File 'lib/openapi_parser/schemas/base.rb', line 7

def parent
  @parent
end

#raw_schemaObject (readonly)

Returns the value of attribute raw_schema.



7
8
9
# File 'lib/openapi_parser/schemas/base.rb', line 7

def raw_schema
  @raw_schema
end

#rootObject (readonly)

Returns the value of attribute root.



7
8
9
# File 'lib/openapi_parser/schemas/base.rb', line 7

def root
  @root
end

Instance Method Details

#after_initObject

override



21
22
# File 'lib/openapi_parser/schemas/base.rb', line 21

def after_init
end

#inspectObject



24
25
26
# File 'lib/openapi_parser/schemas/base.rb', line 24

def inspect
  @object_reference
end