Sha256: ce01d42a75a2b854ecd37de9fa810b3efc493237e69788582eca9b7c3ae92835

Contents?: true

Size: 213 Bytes

Versions: 4

Compression:

Stored size: 213 Bytes

Contents

# frozen_string_literal: true
require 'object/cache'

# :no-doc:
class Object
  def cache(key = nil, **options, &block)
    block = -> { self } unless block_given?

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
object-cache-0.0.5 lib/object/cache/core_extension.rb
object-cache-0.0.4 lib/object/cache/core_extension.rb
object-cache-0.0.3 lib/object/cache/core_extension.rb
object-cache-0.0.2 lib/object/cache/core_extension.rb