lib/rack/dev-mark/theme/title.rb in rack-dev-mark-0.4.6 vs lib/rack/dev-mark/theme/title.rb in rack-dev-mark-0.5.0
- old
+ new
@@ -1,22 +1,12 @@
-require 'rack/dev-mark/theme/base'
+require 'rack/dev-mark/theme/tag'
module Rack
module DevMark
module Theme
- class Title < Base
+ class Title < Tag
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
+ super options.merge(name: 'title', attribute: nil)
end
end
end
end
end