Class: Gitlab::GrapeOpenapi::Converters::TagConverter
- Inherits:
-
Object
- Object
- Gitlab::GrapeOpenapi::Converters::TagConverter
- Defined in:
- lib/gitlab/grape_openapi/converters/tag_converter.rb
Instance Attribute Summary collapse
-
#api_class ⇒ Object
readonly
Returns the value of attribute api_class.
-
#tag_registry ⇒ Object
readonly
Returns the value of attribute tag_registry.
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(api_class, tag_registry) ⇒ TagConverter
constructor
A new instance of TagConverter.
Constructor Details
#initialize(api_class, tag_registry) ⇒ TagConverter
Returns a new instance of TagConverter.
9 10 11 12 |
# File 'lib/gitlab/grape_openapi/converters/tag_converter.rb', line 9 def initialize(api_class, tag_registry) @api_class = api_class @tag_registry = tag_registry end |
Instance Attribute Details
#api_class ⇒ Object (readonly)
Returns the value of attribute api_class.
7 8 9 |
# File 'lib/gitlab/grape_openapi/converters/tag_converter.rb', line 7 def api_class @api_class end |
#tag_registry ⇒ Object (readonly)
Returns the value of attribute tag_registry.
7 8 9 |
# File 'lib/gitlab/grape_openapi/converters/tag_converter.rb', line 7 def tag_registry @tag_registry end |
Instance Method Details
#convert ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gitlab/grape_openapi/converters/tag_converter.rb', line 14 def convert = (api_class) .each do |tag| tag_registry.register(tag) end end |