module RailsCacheInspector::FragmentForPatch

Public Instance Methods

fragment_for(name = {}, options = nil, &block) click to toggle source
Calls superclass method
# File lib/rails-cache-inspector/fragment_for_patch.rb, line 3
    def fragment_for(name = {}, options = nil, &block)
      fragment   = super(name, options, &block)
      style      = RailsCacheInspector.configuration.highlight_with[:style]
      class_name = RailsCacheInspector.configuration.highlight_with[:class_name]

      <<-HTML.strip_heredoc
        <div style="#{style}" class="#{class_name}">
          #{fragment}
        </div>
      HTML
    end