Class: OasRails::Spec::Operation
- Inherits:
-
Object
- Object
- OasRails::Spec::Operation
- Includes:
- Specable
- Defined in:
- lib/oas_rails/spec/operation.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#operation_id ⇒ Object
Returns the value of attribute operation_id.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#request_body ⇒ Object
Returns the value of attribute request_body.
-
#responses ⇒ Object
Returns the value of attribute responses.
-
#security ⇒ Object
Returns the value of attribute security.
-
#specification ⇒ Object
Returns the value of attribute specification.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(specification) ⇒ Operation
constructor
A new instance of Operation.
- #oas_fields ⇒ Object
Methods included from Specable
Constructor Details
#initialize(specification) ⇒ Operation
Returns a new instance of Operation.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/oas_rails/spec/operation.rb', line 8 def initialize(specification) @specification = specification @summary = "" @operation_id = "" @tags = [] @description = @summary @parameters = [] @request_body = {} @responses = Spec::Responses.new(specification) @security = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def description @description end |
#operation_id ⇒ Object
Returns the value of attribute operation_id.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def operation_id @operation_id end |
#parameters ⇒ Object
Returns the value of attribute parameters.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def parameters @parameters end |
#request_body ⇒ Object
Returns the value of attribute request_body.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def request_body @request_body end |
#responses ⇒ Object
Returns the value of attribute responses.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def responses @responses end |
#security ⇒ Object
Returns the value of attribute security.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def security @security end |
#specification ⇒ Object
Returns the value of attribute specification.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def specification @specification end |
#summary ⇒ Object
Returns the value of attribute summary.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def summary @summary end |
#tags ⇒ Object
Returns the value of attribute tags.
6 7 8 |
# File 'lib/oas_rails/spec/operation.rb', line 6 def @tags end |
Instance Method Details
#oas_fields ⇒ Object
20 21 22 |
# File 'lib/oas_rails/spec/operation.rb', line 20 def oas_fields [:tags, :summary, :description, :operation_id, :parameters, :request_body, :responses, :security] end |