Sha256: a5c6488c2baaa8e616c83d2f2ddfae2759131fca0ade1e3a8424cf0c7eb73fa2

Contents?: true

Size: 653 Bytes

Versions: 8

Compression:

Stored size: 653 Bytes

Contents

# Should support 0.2+, though not tested against older versions
module Skylight
  module Probes
    module Tilt
      module Instrumentation
        def render(*args, &block)
          opts = {
            category: "view.render.template",
            title:    options[:sky_virtual_path] || basename || "Unknown template name"
          }

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

      class Probe
        def install
          ::Tilt::Template.prepend(Instrumentation)
        end
      end
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
skylight-5.1.0.beta lib/skylight/probes/tilt.rb
skylight-5.0.1 lib/skylight/probes/tilt.rb
skylight-5.0.0 lib/skylight/probes/tilt.rb
skylight-5.0.0.beta5 lib/skylight/probes/tilt.rb
skylight-5.0.0.beta4 lib/skylight/probes/tilt.rb
skylight-5.0.0.beta3 lib/skylight/probes/tilt.rb
skylight-5.0.0.beta2 lib/skylight/probes/tilt.rb
skylight-5.0.0.beta lib/skylight/probes/tilt.rb