Sha256: a184caa311bcb6fea85db4f03b119022f0d11ee2b939d610c8794d8ffc5fd810

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

module Skylight
  module Probes
    module Tilt
      class Probe
        def install
          ::Tilt::Template.class_eval do
            alias render_without_sk render

            def render(*args, &block)
              opts = {
                category: "view.render.template",
                title: options[:sky_virtual_path] || "Unknown template name"
              }

              Skylight.instrument(opts) do
                render_without_sk(*args, &block)
              end
            end
          end
        end
      end
    end

    register("Tilt::Template", "tilt/template", Tilt::Probe.new)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skylight-0.6.0.beta.1 lib/skylight/probes/tilt.rb