Class: Scorpio::OpenAPI::OperationsScope
- Inherits:
-
Object
- Object
- Scorpio::OpenAPI::OperationsScope
- Includes:
- Enumerable, JSI::Memoize
- Defined in:
- lib/scorpio/openapi/operations_scope.rb
Instance Attribute Summary collapse
-
#openapi_document ⇒ Object
readonly
Returns the value of attribute openapi_document.
Instance Method Summary collapse
- #[](operationId_) ⇒ Object
- #each ⇒ Object
-
#initialize(openapi_document) ⇒ OperationsScope
constructor
A new instance of OperationsScope.
Constructor Details
#initialize(openapi_document) ⇒ OperationsScope
Returns a new instance of OperationsScope.
6 7 8 |
# File 'lib/scorpio/openapi/operations_scope.rb', line 6 def initialize(openapi_document) @openapi_document = openapi_document end |
Instance Attribute Details
#openapi_document ⇒ Object (readonly)
Returns the value of attribute openapi_document.
9 10 11 |
# File 'lib/scorpio/openapi/operations_scope.rb', line 9 def openapi_document @openapi_document end |
Instance Method Details
#[](operationId_) ⇒ Object
22 23 24 25 26 |
# File 'lib/scorpio/openapi/operations_scope.rb', line 22 def [](operationId_) memoize(:[], operationId_) do |operationId| detect { |operation| operation.operationId == operationId } end end |