Class: Metamagic::MetaTag

Inherits:
Tag
  • Object
show all
Defined in:
lib/metamagic/tags/meta_tag.rb

Instance Attribute Summary

Attributes inherited from Tag

#context, #key, #value

Instance Method Summary collapse

Methods inherited from Tag

#<=>, #==, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Metamagic::Tag

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Metamagic::Tag

Instance Method Details

#sort_orderObject



8
9
10
# File 'lib/metamagic/tags/meta_tag.rb', line 8

def sort_order
  2
end

#to_htmlObject



3
4
5
6
# File 'lib/metamagic/tags/meta_tag.rb', line 3

def to_html
  return unless values = Array(value).compact.presence
  tag(:meta, name: key, content: values.join(", "))
end