Class: OasRails::Spec::Tag

Inherits:
Object
  • Object
show all
Includes:
Specable
Defined in:
lib/oas_rails/spec/tag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Specable

#as_json, #to_spec

Constructor Details

#initialize(name:, description:) ⇒ Tag

Returns a new instance of Tag.



8
9
10
11
# File 'lib/oas_rails/spec/tag.rb', line 8

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

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/oas_rails/spec/tag.rb', line 6

def description
  @description
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/oas_rails/spec/tag.rb', line 6

def name
  @name
end

Instance Method Details

#oas_fieldsObject



13
14
15
# File 'lib/oas_rails/spec/tag.rb', line 13

def oas_fields
  [:name, :description]
end