Class: Object

Inherits:
BasicObject
Defined in:
lib/object/cache/core_extension.rb

Overview

:no-doc:

Instance Method Summary collapse

Instance Method Details

#cache(key = nil, **options, &block) ⇒ Object



6
7
8
9
10
# File 'lib/object/cache/core_extension.rb', line 6

def cache(key = nil, **options, &block)
  block = -> { self } unless block_given?

  Cache.new(key, **options, &block)
end