Sha256: ea3536a1476f28413030030181621cb730832237351e154a0d65a13acc80a75b

Contents?: true

Size: 235 Bytes

Versions: 7

Compression:

Stored size: 235 Bytes

Contents

module Moysklad::Entities
  class Base
    #include Object

    private

    def cache ns, key
      @cache||={}
      @cache[ns]||={}
      cc = @cache[ns]

      cc[key] = yield unless cc.has_key? key
      cc[key]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
moysklad-0.2.1 lib/moysklad/entities/base.rb
moysklad-0.2.0 lib/moysklad/entities/base.rb
moysklad-0.1.5 lib/moysklad/entities/base.rb
moysklad-0.1.4 lib/moysklad/entities/base.rb
moysklad-0.1.3 lib/moysklad/entities/base.rb
moysklad-0.1.2 lib/moysklad/entities/base.rb
moysklad-0.1.1 lib/moysklad/entities/base.rb