Class: Metamagic::MetaTag

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

Direct Known Subclasses

TwitterTag

Instance Attribute Summary

Attributes inherited from Tag

#context, #key, #value

Instance Method Summary collapse

Methods inherited from Tag

#<=>, #==, #initialize, #interpolated_values, #method_missing, #template

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

#remove_prefix?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/metamagic/tags/meta_tag.rb', line 12

def remove_prefix?
  false
end

#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 if interpolated_values.empty?
  tag(:meta, name: key, content: interpolated_values.join(", ").html_safe)
end