Module: DeepCover::Tools::ContentTag

Included in:
Reporter::HTML::Base
Defined in:
lib/deep_cover/tools/content_tag.rb

Instance Method Summary collapse

Instance Method Details

#content_tag(tag, content, **options) ⇒ Object

Poor man’s content_tag. No HTML escaping included



6
7
8
9
# File 'lib/deep_cover/tools/content_tag.rb', line 6

def (tag, content, **options)
  attrs = options.map { |kind, value| %{ #{kind}="#{value}"} }.join
  "<#{tag}#{attrs}>#{content}</#{tag}>"
end