Class: Endpointer::ResourceExecutor
- Inherits:
-
Object
- Object
- Endpointer::ResourceExecutor
- Defined in:
- lib/endpointer/resource_executor.rb
Instance Method Summary collapse
Instance Method Details
#perform(request, resource, options) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/endpointer/resource_executor.rb', line 7 def perform(request, resource, ) begin cache(.cache_dir).get(resource) rescue Endpointer::Errors::CachedItemNotFoundError response = Endpointer::PerformerFactory.create(resource.method).execute(request, resource) cache(.cache_dir).set(resource, response) response end end |