Sha256: 6d826c08a3a5993c5afcb866c3fcd42ee95a0e3d617e324c9a5a143bffc8bd12

Contents?: true

Size: 362 Bytes

Versions: 2

Compression:

Stored size: 362 Bytes

Contents

module PageMeta
  class MetaTag
    class Og < MetaTag
      def render
        return if content.empty?

        content.each_with_object("") do |(attr, value), buffer|
          next if value.blank?
          attr = attr.to_s.gsub(/_/, ":")
          buffer << helpers.tag(:meta, property: "og:#{attr}", content: value)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page_meta-0.1.1 lib/page_meta/meta_tag/og.rb
page_meta-0.1.0 lib/page_meta/meta_tag/og.rb