class MetaTags::Tag

Represents an HTML meta tag with no content (<tag />).

def initialize(name, attributes = {})

Parameters:
  • attributes (Hash) -- list of HTML tag attributes
  • name (String, Symbol) -- HTML tag name
def initialize(name, attributes = {})
  @name = name.to_s
  @attributes = attributes
end

def prepare_attributes(attributes)

def prepare_attributes(attributes)
  attributes.each do |key, value|
    attributes[key] = value.iso8601 if value.respond_to?(:iso8601)
  end
end

def render(view)

Returns:
  • (String) - HTML string for the tag.

Parameters:
  • view (ActionView::Base) -- instance of a Rails view.
def render(view)
  view.tag(name, prepare_attributes(attributes), MetaTags.config.open_meta_tags?)
end