Class: WsdlMapper::Runtime::Api
- Inherits:
-
Object
- Object
- WsdlMapper::Runtime::Api
- Includes:
- SimplerInspect
- Defined in:
- lib/wsdl_mapper/runtime/api.rb
Instance Attribute Summary collapse
-
#_services ⇒ Array<WsdlMapper::Runtime::Service>
All services contained in this API.
Instance Method Summary collapse
-
#_call(operation, *args) ⇒ Object
Executes a request using the configured backend.
-
#_call_async(operation, args_promise) ⇒ Concurrent::Promise
Executes a request async using the configured backend.
-
#_load_requires ⇒ Object
Force preloading of requires for all contained services.
-
#initialize(backend) ⇒ Api
constructor
A new instance of Api.
Methods included from SimplerInspect
Constructor Details
#initialize(backend) ⇒ Api
Returns a new instance of Api.
15 16 17 18 |
# File 'lib/wsdl_mapper/runtime/api.rb', line 15 def initialize(backend) @_backend = backend @_services = [] end |
Instance Attribute Details
#_services ⇒ Array<WsdlMapper::Runtime::Service>
Returns All services contained in this API.
11 12 13 |
# File 'lib/wsdl_mapper/runtime/api.rb', line 11 def _services @_services end |
Instance Method Details
#_call(operation, *args) ⇒ Object
Executes a request using the configured backend.
24 25 26 |
# File 'lib/wsdl_mapper/runtime/api.rb', line 24 def _call(operation, *args) @_backend.dispatch operation, *args end |
#_call_async(operation, args_promise) ⇒ Concurrent::Promise
Executes a request async using the configured backend.
32 33 34 |
# File 'lib/wsdl_mapper/runtime/api.rb', line 32 def _call_async(operation, args_promise) @_backend.dispatch_async operation, args_promise end |
#_load_requires ⇒ Object
Force preloading of requires for all contained services
37 38 39 |
# File 'lib/wsdl_mapper/runtime/api.rb', line 37 def _load_requires @_services.each(&:_load_requires) end |