Class: Wrappi::AsyncHandler
- Inherits:
-
Object
- Object
- Wrappi::AsyncHandler
- Defined in:
- lib/wrappi/async_handler.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(endpoint, options) ⇒ AsyncHandler
constructor
A new instance of AsyncHandler.
Constructor Details
#initialize(endpoint, options) ⇒ AsyncHandler
Returns a new instance of AsyncHandler.
7 8 9 10 |
# File 'lib/wrappi/async_handler.rb', line 7 def initialize(endpoint, ) @endpoint = endpoint = end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
6 7 8 |
# File 'lib/wrappi/async_handler.rb', line 6 def endpoint @endpoint end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/wrappi/async_handler.rb', line 6 def end |
Class Method Details
.call(*args) ⇒ Object
3 4 5 |
# File 'lib/wrappi/async_handler.rb', line 3 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
12 13 14 15 |
# File 'lib/wrappi/async_handler.rb', line 12 def call AsyncJob.set(([:set] || {})) .perform_later(endpoint.class.to_s, { params: endpoint.input_params, options: endpoint. }, ) end |