Class: Praxis::Docs::OpenApi::TagObject

Inherits:
Object
  • Object
show all
Defined in:
lib/praxis/docs/open_api/tag_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, description:) ⇒ TagObject

Returns a new instance of TagObject.



9
10
11
12
# File 'lib/praxis/docs/open_api/tag_object.rb', line 9

def initialize(name:, description:)
  @name = name
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



7
8
9
# File 'lib/praxis/docs/open_api/tag_object.rb', line 7

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/praxis/docs/open_api/tag_object.rb', line 7

def name
  @name
end

Instance Method Details

#dumpObject



14
15
16
17
18
19
20
# File 'lib/praxis/docs/open_api/tag_object.rb', line 14

def dump
  h = description ? { description: description } : {}
  h.merge(
    name: name
    # externalDocs: ???,
  )
end