Class: Rack::DevMark::Theme::Tag
- Defined in:
- lib/rack/dev-mark/theme/tag.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Tag
constructor
A new instance of Tag.
- #insert_into(html) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Tag
Returns a new instance of Tag.
7 8 9 10 |
# File 'lib/rack/dev-mark/theme/tag.rb', line 7 def initialize( = {}) = super end |
Instance Method Details
#insert_into(html) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rack/dev-mark/theme/tag.rb', line 12 def insert_into(html) name = [:name] if name html = gsub_tag_content html, name do |value| env_with(value) end end if attribute = [:attribute] Array(attribute).each do |attr| html = gsub_tag_attribute html, name, attr do |value| env_with(value) end end end html end |