Sha256: af2b456641d398178726d3e66e35e137468d5aac8ed2121e68bf4856d56210a6
Contents?: true
Size: 510 Bytes
Versions: 7
Compression:
Stored size: 510 Bytes
Contents
require 'rack/dev-mark/theme/base' module Rack module DevMark module Theme class Title < Base def initialize(options = {}) @options = options end def insert_into(html) s = env.to_s s = s.upcase if @options[:upcase] if @options[:type].to_s == 'postfix' html.sub %r{(</title[^>]*>)}i, " (#{s})\\1" else html.sub %r{(<title[^>]*>)}i, "\\1(#{s}) " end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems