class R2OAS::Schema::V3::FromFiles::PathsObject

Public Class Methods

new(doc, opts = {}) click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/paths_object.rb, line 11
def initialize(doc, opts = {})
  super(opts)
  @doc = doc
end

Public Instance Methods

to_doc() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/paths_object.rb, line 16
def to_doc
  create_doc
  @doc
end

Private Instance Methods

create_doc() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/paths_object.rb, line 23
def create_doc
  @doc.each do |path, doc_when_path|
    ref = { path: path }
    @doc[path] = PathItemObject.new(doc_when_path, ref, opts).to_doc
  end
end