Class: Rack::DevMark::Theme::Title
- Defined in:
- lib/rack/dev-mark/theme/title.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Title
constructor
A new instance of Title.
- #insert_into(html) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Title
Returns a new instance of Title.
7 8 9 |
# File 'lib/rack/dev-mark/theme/title.rb', line 7 def initialize( = {}) = end |
Instance Method Details
#insert_into(html) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/rack/dev-mark/theme/title.rb', line 11 def insert_into(html) s = env.to_s s = s.upcase if [:upcase] if [:type].to_s == 'postfix' html.sub %r{(</title[^>]*>)}i, " (#{s})\\1" else html.sub %r{(<title[^>]*>)}i, "\\1(#{s}) " end end |