Sha256: 2059a96e8c58dc31fc79a2622975c500687794c7216de4f65466cc6e458d6c66
Contents?: true
Size: 548 Bytes
Versions: 11
Compression:
Stored size: 548 Bytes
Contents
# frozen_string_literal: true module Openapi3Parser module NodeFactory class OptionalReference def initialize(factory) @factory = factory end def object_type "#{self.class}[#{factory.object_type}]}" end def call(context) reference = context.input.is_a?(Hash) && context.input["$ref"] if reference NodeFactory::Reference.new(context, self) else factory.new(context) end end private attr_reader :factory end end end
Version data entries
11 entries across 11 versions & 2 rubygems