Class: Grape::Formatter::Jbuilder
- Inherits:
-
Object
- Object
- Grape::Formatter::Jbuilder
- Defined in:
- lib/grape-shaman_cache/formatter.rb
Overview
For maximum performance we are fetching string from redis and return them with no parsing at all
Class Method Summary collapse
Class Method Details
.call(object, env) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/grape-shaman_cache/formatter.rb', line 6 def self.call(object, env) # object is string means that we need to use cache return object if object.is_a?(String) return new(object.call, env).call if object.is_a?(Proc) new(object, env).call end |