Sha256: 2e84b82638d4f42341042f5e1eeda8d4f82d10fe5bfbf1290f4d9b6f5a5828b5
Contents?: true
Size: 349 Bytes
Versions: 1
Compression:
Stored size: 349 Bytes
Contents
require 'rack-plastic' module Rack class Gsub < Plastic def change_nokogiri_doc(doc) doc.at_css("body").traverse do |node| if node.text? options.each do |pattern, replacement| update_text(node, node.content.gsub(pattern, replacement)) end end end doc end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rack-gsub-0.0.0 | lib/rack-gsub.rb |