Class: ClientApiBuilder::NestedRouter
- Inherits:
-
Object
- Object
- ClientApiBuilder::NestedRouter
show all
- Includes:
- Router
- Defined in:
- lib/client_api_builder/nested_router.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Router
#build_body, #build_connection_options, #build_headers, #build_query, #build_uri, #escape_path, #expected_response_code!, #get_retry_request_max_retries, #get_retry_request_sleep_time, included, #instrument_request, #log_request_exception, #parse_response, #request_log_message, #request_wrapper, #retry_request, #retry_request?
Constructor Details
#initialize(root_router, nested_router_options) ⇒ NestedRouter
Returns a new instance of NestedRouter.
14
15
16
17
|
# File 'lib/client_api_builder/nested_router.rb', line 14
def initialize(root_router, nested_router_options)
@root_router = root_router
@nested_router_options = nested_router_options
end
|
Instance Attribute Details
#nested_router_options ⇒ Object
Returns the value of attribute nested_router_options.
11
12
13
|
# File 'lib/client_api_builder/nested_router.rb', line 11
def nested_router_options
@nested_router_options
end
|
#root_router ⇒ Object
Returns the value of attribute root_router.
11
12
13
|
# File 'lib/client_api_builder/nested_router.rb', line 11
def root_router
@root_router
end
|
Class Method Details
.get_instance_method(var) ⇒ Object
19
20
21
|
# File 'lib/client_api_builder/nested_router.rb', line 19
def self.get_instance_method(var)
"\#{root_router.#{var}\}"
end
|
Instance Method Details
#base_url ⇒ Object
39
40
41
|
# File 'lib/client_api_builder/nested_router.rb', line 39
def base_url
self.class.base_url || root_router.base_url
end
|
#handle_response(response, options, &block) ⇒ Object
43
44
45
|
# File 'lib/client_api_builder/nested_router.rb', line 43
def handle_response(response, options, &block)
root_router.handle_response(response, options, &block)
end
|
#request(**options, &block) ⇒ Object
23
24
25
|
# File 'lib/client_api_builder/nested_router.rb', line 23
def request(**options, &block)
root_router.request(**options, &block)
end
|
#stream(**options, &block) ⇒ Object
27
28
29
|
# File 'lib/client_api_builder/nested_router.rb', line 27
def stream(**options, &block)
root_router.stream(**options, &block)
end
|
#stream_to_file(**options, &block) ⇒ Object
35
36
37
|
# File 'lib/client_api_builder/nested_router.rb', line 35
def stream_to_file(**options, &block)
root_router.stream_to_file(**options, &block)
end
|
#stream_to_io(**options, &block) ⇒ Object
31
32
33
|
# File 'lib/client_api_builder/nested_router.rb', line 31
def stream_to_io(**options, &block)
root_router.stream_to_io(**options, &block)
end
|