module DeepCover::Tools::ContentTag

Public Instance Methods

content_tag(tag, content, **options) click to toggle source

Poor man's content_tag. No HTML escaping included

# File lib/deep_cover/tools/content_tag.rb, line 6
def content_tag(tag, content, **options)
  attrs = options.map { |kind, value| %{ #{kind}="#{value}"} }.join
  "<#{tag}#{attrs}>#{content}</#{tag}>"
end