Class: R2OAS::Schema::V3::TagObject

Inherits:
BaseObject show all
Defined in:
lib/r2-oas/schema/v3/object/from_routes/tag_object.rb

Instance Method Summary collapse

Methods inherited from BaseObject

#components_object_class, #components_request_body_object_class, #components_schema_object_class, #external_document_object_class, #info_object_class, #path_item_object_class, #paths_object_class

Constructor Details

#initialize(tags_data, opts = {}) ⇒ TagObject

Returns a new instance of TagObject.



10
11
12
13
# File 'lib/r2-oas/schema/v3/object/from_routes/tag_object.rb', line 10

def initialize(tags_data, opts = {})
  super(opts)
  @tags_data = tags_data
end

Instance Method Details

#to_docObject



15
16
17
18
19
# File 'lib/r2-oas/schema/v3/object/from_routes/tag_object.rb', line 15

def to_doc
  @tags_data.each_with_object([]) do |tag_name, result|
    result.push(create_doc(tag_name))
  end
end