Class: Processor
- Inherits:
-
Object
- Object
- Processor
- Defined in:
- lib/processor.rb
Constant Summary
Constants included from Resources
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(payload) ⇒ Processor
constructor
A new instance of Processor.
Methods included from Resources
Methods included from Callable
Constructor Details
#initialize(payload) ⇒ Processor
Returns a new instance of Processor.
7 8 9 10 |
# File 'lib/processor.rb', line 7 def initialize(payload) @resource = payload[:resource] @params = payload[:params] end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 |
# File 'lib/processor.rb', line 12 def execute service = Resources::REGISTERED[@resource] service.call(@params) end |