Sha256: 64aea1b39176bcdf1b307285a3a494f6a9de7b9d3bc83c60bbe3f94cf27070af

Contents?: true

Size: 622 Bytes

Versions: 7

Compression:

Stored size: 622 Bytes

Contents

module Liquid
  class Block < Tag
    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(@template_name) do
        render_without_profiling(context)
      end
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
liquid-3.0.6 lib/liquid/profiler/hooks.rb
liquid-3.0.5 lib/liquid/profiler/hooks.rb
liquid-3.0.4 lib/liquid/profiler/hooks.rb
liquid-3.0.3 lib/liquid/profiler/hooks.rb
liquid-3.0.2 lib/liquid/profiler/hooks.rb
liquid-3.0.1 lib/liquid/profiler/hooks.rb
liquid-3.0.0 lib/liquid/profiler/hooks.rb