Class: OpenApi::Tag
- Inherits:
-
Object
- Object
- OpenApi::Tag
- Includes:
- EquatableAsContent
- Defined in:
- lib/open_api/tag.rb
Overview
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#external_docs ⇒ Object
Returns the value of attribute external_docs.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, description: nil, external_docs: nil) ⇒ Tag
constructor
A new instance of Tag.
Methods included from EquatableAsContent
Constructor Details
#initialize(name:, description: nil, external_docs: nil) ⇒ Tag
Returns a new instance of Tag.
8 9 10 11 12 |
# File 'lib/open_api/tag.rb', line 8 def initialize(name:, description: nil, external_docs: nil) self.name = name self.description = description self.external_docs = external_docs end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/open_api/tag.rb', line 6 def description @description end |
#external_docs ⇒ Object
Returns the value of attribute external_docs.
6 7 8 |
# File 'lib/open_api/tag.rb', line 6 def external_docs @external_docs end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/open_api/tag.rb', line 6 def name @name end |
Class Method Details
.load(hash) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/open_api/tag.rb', line 14 def self.load(hash) return unless hash new( name: hash["name"].to_s, description: hash["description"]&.to_s, external_docs: ExternalDocumentation.load(hash["externalDocs"]), ) end |