Module: OpenapiBlocks::Concerns::Documentable::ClassMethods
- Defined in:
- lib/openapi_blocks/concerns/documentable.rb
Overview
rubocop:disable Style/Documentation
Instance Attribute Summary collapse
-
#_operations ⇒ Object
readonly
Returns the value of attribute _operations.
-
#_tags ⇒ Object
readonly
Returns the value of attribute _tags.
Instance Method Summary collapse
Instance Attribute Details
#_operations ⇒ Object (readonly)
Returns the value of attribute _operations.
11 12 13 |
# File 'lib/openapi_blocks/concerns/documentable.rb', line 11 def _operations @_operations end |
#_tags ⇒ Object (readonly)
Returns the value of attribute _tags.
11 12 13 |
# File 'lib/openapi_blocks/concerns/documentable.rb', line 11 def @_tags end |
Instance Method Details
#operation(action, &block) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/openapi_blocks/concerns/documentable.rb', line 13 def operation(action, &block) @_operations ||= {} builder = OperationBuilder.new builder.instance_eval(&block) if block @_operations[action] = builder end |
#tags(*values) ⇒ Object
20 21 22 |
# File 'lib/openapi_blocks/concerns/documentable.rb', line 20 def (*values) values.any? ? @_tags = values : @_tags end |