class PIM::Services::LoadRequest
Attributes
keys[R]
original_request[R]
parent[R]
proxy_args[R]
redirect_args[R]
request_type[R]
Public Class Methods
new(request_type, **kwargs)
click to toggle source
# File services.rb, line 275 def initialize request_type, **kwargs @request_type = request_type @original_request = kwargs.delete(:original_request) @request_kwargs = kwargs @keys, @parent, @redirect_args, @proxy_args = request_type.request_args(**kwargs) end
Public Instance Methods
actual_keys()
click to toggle source
# File services.rb, line 312 def actual_keys return @original_request.nil? ? keys : @original_request.actual_keys end
convert_result(result)
click to toggle source
# File services.rb, line 296 def convert_result result return request_type.convert_result(result) end
copy(**kwargs)
click to toggle source
Creates a new request for the same request_type
but with the specified kwargs
# File services.rb, line 284 def copy **kwargs request_type.request(**(@request_kwargs.merge(kwargs).merge(original_request: self))) end
empty_result()
click to toggle source
# File services.rb, line 316 def empty_result return {} if return_type == Hash return [] if return_type == Array return nil end
proxy_service_method_name()
click to toggle source
# File services.rb, line 300 def proxy_service_method_name return request_type.proxy_service_method_name end
redirect(data_module, *loaders)
click to toggle source
# File services.rb, line 308 def redirect data_module, *loaders return request_type.redirect(data_module, *loaders, **redirect_args) end
redirect?()
click to toggle source
# File services.rb, line 304 def redirect? return request_type.redirect? end
request_name()
click to toggle source
# File services.rb, line 288 def request_name request_type.name end
return_type()
click to toggle source
# File services.rb, line 292 def return_type request_type.return_type end