Sha256: f33a92d976c08a095582ccbeaa00bd54584538e9198e15d31dc53dd07d0b5abf

Contents?: true

Size: 261 Bytes

Versions: 5

Compression:

Stored size: 261 Bytes

Contents

module TarvitHelpers
  module HashPresenter
    class Cached < Simple
      def initialize(hash, levels=[], parent=nil)
        super
        @cache = {}
      end

      def _value(method_name)
        @cache[method_name] ||= super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tarvit-helpers-0.0.23 lib/tarvit-helpers/modules/hash_presenter/cached.rb
tarvit-helpers-0.0.22 lib/tarvit-helpers/modules/hash_presenter/cached.rb
tarvit-helpers-0.0.21 lib/tarvit-helpers/modules/hash_presenter/cached.rb
tarvit-helpers-0.0.20 lib/tarvit-helpers/modules/hash_presenter/cached.rb
tarvit-helpers-0.0.19 lib/tarvit-helpers/modules/hash_presenter/cached_hash_presenter.rb