Sha256: 148cb1a9a3b361461701c421406dff90ab2ad3eb5600f593e223038d177e5033
Contents?: true
Size: 373 Bytes
Versions: 3
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true module PageMeta class HashMetaTag < MetaTag def render return if content.empty? content.each_with_object([]) do |(attr, value), buffer| next if value.blank? attr = attr.to_s.tr("_", ":") buffer << helpers.tag(:meta, property: "#{base_name}:#{attr}", content: value) end.join end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
page_meta-0.2.0 | lib/page_meta/hash_meta_tag.rb |
page_meta-0.1.3 | lib/page_meta/hash_meta_tag.rb |
page_meta-0.1.2 | lib/page_meta/hash_meta_tag.rb |