Sha256: d24062a92edb1cba360d9c5408f2532c7af68614e9690df878b7d938447f8bdc

Contents?: true

Size: 342 Bytes

Versions: 2

Compression:

Stored size: 342 Bytes

Contents

module Metamagic
  class PropertyTag < Tag
    def initialize(context, key, value)
      super
      @key = @key.gsub /^property:/, "" # If added via property helper
    end

    def to_html
      Array(value).map { |value| tag(:meta, property: key, content: value) }.join("\n").html_safe
    end

    def sort_order
      3
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metamagic-3.0.0 lib/metamagic/tags/property_tag.rb
metamagic-3.0.0.beta3 lib/metamagic/tags/property_tag.rb