Sha256: a0f31b80c397a4bf3f4d17897c0bdb30c82e49c539f0ddcdafc1451d2571aec6

Contents?: true

Size: 502 Bytes

Versions: 9

Compression:

Stored size: 502 Bytes

Contents

module Spontaneous::Output::Context
  module RenderCache
    def _render_cache_value(key)
      _renderer.render_cache[key]
    end

    def _render_cache_set_value(key, value)
      _renderer.render_cache[key] = value
    end

    def _render_cache_key?(key)
      _renderer.render_cache.key?(key)
    end

    def _with_render_cache(key, &value_block)
      if _render_cache_key?(key)
        _render_cache_value(key)
      else
        _render_cache_set_value(key, yield)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta9 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta8 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta7 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta6 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta5 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta4 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta3 lib/spontaneous/output/context/render_cache.rb
spontaneous-0.2.0.beta2 lib/spontaneous/output/context/render_cache.rb