Class: Rack::DevMark::Theme::Tag
- Defined in:
- lib/rack/dev-mark/theme/tag.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rack::DevMark::Theme::Base
Instance Method Details
#insert_into(html, env, params = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rack/dev-mark/theme/tag.rb', line 7 def insert_into(html, env, params = {}) name = @options[:name] if name html = gsub_tag_content html, name do |value| env_with_value(env, value) end end if attribute = @options[:attribute] Array(attribute).each do |attr| html = gsub_tag_attribute html, name, attr do |value| env_with_value(env, value) end end end html end |