Sha256: 3f9fbf6b760c4ff15ae3b847d77d89a1851abcf8a62da86376f67dfd8eda542b

Contents?: true

Size: 643 Bytes

Versions: 4

Compression:

Stored size: 643 Bytes

Contents

module Liquid
  class BlockBody
    def render_token_with_profiling(token, context)
      Profiler.profile_token_render(token) do
        render_token_without_profiling(token, context)
      end
    end

    alias_method :render_token_without_profiling, :render_token
    alias_method :render_token, :render_token_with_profiling
  end

  class Include < Tag
    def render_with_profiling(context)
      Profiler.profile_children(context.evaluate(@template_name).to_s) do
        render_without_profiling(context)
      end
    end

    alias_method :render_without_profiling, :render
    alias_method :render, :render_with_profiling
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms-liquid-4.0.0 lib/liquid/profiler/hooks.rb
locomotivecms-liquid-4.0.0.alpha2 lib/liquid/profiler/hooks.rb
locomotivecms-liquid-4.0.0.alpha1 lib/liquid/profiler/hooks.rb
locomotivecms-liquid-4.0.0.alpha lib/liquid/profiler/hooks.rb