class RorVsWild::Plugin::ActionView
Public Class Methods
Source
# File lib/rorvswild/plugin/action_view.rb, line 6 def self.setup return if @installed return unless defined?(::ActiveSupport::Notifications.subscribe) ActiveSupport::Notifications.subscribe("render_partial.action_view", plugin = new) ActiveSupport::Notifications.subscribe("render_template.action_view", plugin) ActiveSupport::Notifications.subscribe("render_collection.action_view", plugin) @installed = true end
Public Instance Methods
Source
# File lib/rorvswild/plugin/action_view.rb, line 21 def finish(name, id, payload) return if !payload[:identifier] return if payload[:count] == 0 # render empty collection RorVsWild::Section.stop do |section| section.kind = "view" section.commands << RorVsWild.agent.locator.relative_path(payload[:identifier]) section.file = section.command section.line = 0 section.calls = payload[:count] if payload[:count] # render collection end end
Source
# File lib/rorvswild/plugin/action_view.rb, line 15 def start(name, id, payload) return if !payload[:identifier] return if payload[:count] == 0 # render empty collection RorVsWild::Section.start end