Sha256: acbfd74c4e2fcf5539cbe15e63a540d242d437cd4f719497d2d0dce52f66c011

Contents?: true

Size: 486 Bytes

Versions: 15

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

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

15 entries across 15 versions & 1 rubygems

Version Path
meta-tags-2.22.1 lib/meta_tags/content_tag.rb
meta-tags-2.22.1.rc1 lib/meta_tags/content_tag.rb
meta-tags-2.22.0 lib/meta_tags/content_tag.rb
meta-tags-2.21.0 lib/meta_tags/content_tag.rb
meta-tags-2.20.0 lib/meta_tags/content_tag.rb
meta-tags-2.19.0 lib/meta_tags/content_tag.rb
meta-tags-2.18.0 lib/meta_tags/content_tag.rb
meta-tags-2.17.0 lib/meta_tags/content_tag.rb
meta-tags-2.16.0 lib/meta_tags/content_tag.rb
meta-tags-2.15.0 lib/meta_tags/content_tag.rb
meta-tags-2.14.0 lib/meta_tags/content_tag.rb
meta-tags-2.13.0 lib/meta_tags/content_tag.rb
meta-tags-2.12.0 lib/meta_tags/content_tag.rb
meta-tags-2.11.1 lib/meta_tags/content_tag.rb
meta-tags-2.11.0 lib/meta_tags/content_tag.rb