Class: R2OAS::Schema::V3::TagObject
- Inherits:
-
BaseObject
- Object
- BaseObject
- R2OAS::Schema::V3::TagObject
- Defined in:
- lib/r2-oas/schema/v3/object/from_routes/tag_object.rb
Instance Method Summary collapse
-
#initialize(tags_data, opts = {}) ⇒ TagObject
constructor
A new instance of TagObject.
- #to_doc ⇒ Object
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(, opts = {}) super(opts) @tags_data = end |
Instance Method Details
#to_doc ⇒ Object
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 |