Class: Openapi3Parser::NodeFactory::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi3_parser/node_factory/reference.rb

Instance Attribute Summary collapse

Attributes inherited from Object

#context, #data

Instance Method Summary collapse

Methods inherited from Object

#allowed_fields, #can_use_default?, #default, #errors, #inspect, #nil_input?, #node, #raw_input, #required_fields, #resolved_input, #valid?

Methods included from ObjectFactory::Dsl

#allow_extensions, #allowed_extensions?, #field, #field_configs, #mutually_exclusive, #mutually_exclusive_fields, #validate, #validations

Constructor Details

#initialize(context, factory) ⇒ Reference

Returns a new instance of Reference.



15
16
17
18
# File 'lib/openapi3_parser/node_factory/reference.rb', line 15

def initialize(context, factory)
  @factory = factory
  super(context)
end

Instance Attribute Details

#factoryObject (readonly)

Returns the value of attribute factory.



13
14
15
# File 'lib/openapi3_parser/node_factory/reference.rb', line 13

def factory
  @factory
end

Instance Method Details

#in_recursive_loop?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/openapi3_parser/node_factory/reference.rb', line 20

def in_recursive_loop?
  data["$ref"].in_recursive_loop?
end

#recursive_pointerObject



24
25
26
# File 'lib/openapi3_parser/node_factory/reference.rb', line 24

def recursive_pointer
  NodeFactory::RecursivePointer.new(data["$ref"].reference_context)
end