Class: Skylight::Core::Probes::Tilt::Probe Private

Inherits:
Object
  • Object
show all
Defined in:
lib/skylight/core/probes/tilt.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#installObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/skylight/core/probes/tilt.rb', line 6

def install
  ::Tilt::Template.class_eval do
    alias_method :render_without_sk, :render

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

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