Class: Seiun::Callback::Wrapper
- Inherits:
-
Object
- Object
- Seiun::Callback::Wrapper
- Defined in:
- lib/seiun/callback/wrapper.rb
Instance Method Summary collapse
- #after_build_xml(xml) ⇒ Object
- #after_close_job(job) ⇒ Object
- #after_create_job(job) ⇒ Object
- #after_response(request_type, path, response_body) ⇒ Object
- #before_build_xml(records) ⇒ Object
- #before_request(request_type, path, request_body) ⇒ Object
-
#initialize(callback_class) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #job=(job) ⇒ Object
- #mock_response_add_batch ⇒ Object
- #mock_response_add_query ⇒ Object
- #mock_response_close_job ⇒ Object
- #mock_response_create_job ⇒ Object
- #mock_response_get_batch_details ⇒ Object
- #mock_response_get_job_details ⇒ Object
- #mock_response_get_query_result ⇒ Object
- #mock_response_get_result ⇒ Object
- #ssl_verify_none ⇒ Object
Constructor Details
#initialize(callback_class) ⇒ Wrapper
Returns a new instance of Wrapper.
4 5 6 |
# File 'lib/seiun/callback/wrapper.rb', line 4 def initialize(callback_class) @class = callback_class end |
Instance Method Details
#after_build_xml(xml) ⇒ Object
27 28 29 30 |
# File 'lib/seiun/callback/wrapper.rb', line 27 def after_build_xml(xml) return unless callback_defined?(:after_build_xml) @class.__send__(callbacks[:after_build_xml], xml) end |
#after_close_job(job) ⇒ Object
17 18 19 20 |
# File 'lib/seiun/callback/wrapper.rb', line 17 def after_close_job(job) return unless callback_defined?(:after_close_job) @class.__send__(callbacks[:after_close_job], job) end |
#after_create_job(job) ⇒ Object
12 13 14 15 |
# File 'lib/seiun/callback/wrapper.rb', line 12 def after_create_job(job) return unless callback_defined?(:after_create_job) @class.__send__(callbacks[:after_create_job], job) end |
#after_response(request_type, path, response_body) ⇒ Object
37 38 39 40 |
# File 'lib/seiun/callback/wrapper.rb', line 37 def after_response(request_type, path, response_body) return unless callback_defined?(:after_response) @class.__send__(callbacks[:after_response], request_type, path, response_body) end |
#before_build_xml(records) ⇒ Object
22 23 24 25 |
# File 'lib/seiun/callback/wrapper.rb', line 22 def before_build_xml(records) return unless callback_defined?(:before_build_xml) @class.__send__(callbacks[:before_build_xml], records) end |
#before_request(request_type, path, request_body) ⇒ Object
32 33 34 35 |
# File 'lib/seiun/callback/wrapper.rb', line 32 def before_request(request_type, path, request_body) return unless callback_defined?(:before_request) @class.__send__(callbacks[:before_request], request_type, path, request_body) end |
#job=(job) ⇒ Object
8 9 10 |
# File 'lib/seiun/callback/wrapper.rb', line 8 def job=(job) @job = job end |
#mock_response_add_batch ⇒ Object
62 63 64 65 |
# File 'lib/seiun/callback/wrapper.rb', line 62 def mock_response_add_batch return unless callback_defined?(:mock_response_add_batch) @class.__send__(callbacks[:mock_response_add_batch], operation: operation) end |
#mock_response_add_query ⇒ Object
57 58 59 60 |
# File 'lib/seiun/callback/wrapper.rb', line 57 def mock_response_add_query return unless callback_defined?(:mock_response_add_query) @class.__send__(callbacks[:mock_response_add_query], operation: operation) end |
#mock_response_close_job ⇒ Object
52 53 54 55 |
# File 'lib/seiun/callback/wrapper.rb', line 52 def mock_response_close_job return unless callback_defined?(:mock_response_close_job) @class.__send__(callbacks[:mock_response_close_job], operation: operation) end |
#mock_response_create_job ⇒ Object
47 48 49 50 |
# File 'lib/seiun/callback/wrapper.rb', line 47 def mock_response_create_job return unless callback_defined?(:mock_response_create_job) @class.__send__(callbacks[:mock_response_create_job], operation: operation) end |
#mock_response_get_batch_details ⇒ Object
72 73 74 75 |
# File 'lib/seiun/callback/wrapper.rb', line 72 def mock_response_get_batch_details return unless callback_defined?(:mock_response_get_batch_details) @class.__send__(callbacks[:mock_response_get_batch_details], operation: operation) end |
#mock_response_get_job_details ⇒ Object
67 68 69 70 |
# File 'lib/seiun/callback/wrapper.rb', line 67 def mock_response_get_job_details return unless callback_defined?(:mock_response_get_job_details) @class.__send__(callbacks[:mock_response_get_job_details], operation: operation) end |
#mock_response_get_query_result ⇒ Object
82 83 84 85 |
# File 'lib/seiun/callback/wrapper.rb', line 82 def mock_response_get_query_result return unless callback_defined?(:mock_response_get_query_result) @class.__send__(callbacks[:mock_response_get_query_result], operation: operation) end |
#mock_response_get_result ⇒ Object
77 78 79 80 |
# File 'lib/seiun/callback/wrapper.rb', line 77 def mock_response_get_result return unless callback_defined?(:mock_response_get_result) @class.__send__(callbacks[:mock_response_get_result], operation: operation) end |
#ssl_verify_none ⇒ Object
42 43 44 45 |
# File 'lib/seiun/callback/wrapper.rb', line 42 def ssl_verify_none return unless callback_defined?(:ssl_verify_none) @class.__send__(callbacks[:ssl_verify_none]) end |