Sha256: cd38cda7ef48abe286e274ce6ec143de46d1c83fe3357ce9bd5ed7068570a1bf

Contents?: true

Size: 455 Bytes

Versions: 6

Compression:

Stored size: 455 Bytes

Contents

module MetaTags
  # Represents an HTML meta tag with content (<tag></tag>).
  # Content should be passed as a `:content` attribute.
  class ContentTag < Tag
    # Render tag into a Rails view.
    #
    # @param [ActionView::Base] view instance of a Rails view.
    # @return [String] HTML string for the tag.
    #
    def render(view)
      view.content_tag(name, attributes[:content], prepare_attributes(attributes.except(:content)))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
meta-tags-2.10.0 lib/meta_tags/content_tag.rb
meta-tags-2.9.0 lib/meta_tags/content_tag.rb
meta-tags-2.8.0 lib/meta_tags/content_tag.rb
meta-tags-2.7.1 lib/meta_tags/content_tag.rb
meta-tags-2.7.0 lib/meta_tags/content_tag.rb
meta-tags-2.6.0 lib/meta_tags/content_tag.rb