Module: Arena::Cache
- Defined in:
- lib/arena/cache.rb,
lib/arena/cache/adaptor/null.rb,
lib/arena/cache/adaptor/rails.rb,
lib/arena/cache/adaptor/generic.rb,
lib/arena/cache/adaptor/padrino.rb
Defined Under Namespace
Modules: Adaptor
Class Method Summary collapse
- .adapt_to ⇒ Object
-
.method_missing(method) ⇒ Object
Delegate to the appropriate cache engine.
Class Method Details
.adapt_to ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/arena/cache.rb', line 10 def adapt_to if defined?(Rails) 'Rails' elsif defined?(Padrino) 'Padrino' else 'Null' end end |
.method_missing(method) ⇒ Object
Delegate to the appropriate cache engine
22 23 24 |
# File 'lib/arena/cache.rb', line 22 def method_missing(method, ...) "Arena::Cache::Adaptor::#{adapt_to}".constantize.send(method, ...) end |