Class: OpenGraphPlus::Tag
- Inherits:
-
Object
- Object
- OpenGraphPlus::Tag
- Defined in:
- lib/opengraphplus/tag.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
Instance Method Summary collapse
-
#initialize(property, content) ⇒ Tag
constructor
A new instance of Tag.
- #meta ⇒ Object
- #render_in(_view_context = nil) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(property, content) ⇒ Tag
Returns a new instance of Tag.
9 10 11 12 |
# File 'lib/opengraphplus/tag.rb', line 9 def initialize(property, content) @property = property @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
7 8 9 |
# File 'lib/opengraphplus/tag.rb', line 7 def content @content end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
7 8 9 |
# File 'lib/opengraphplus/tag.rb', line 7 def property @property end |
Instance Method Details
#meta ⇒ Object
14 15 16 |
# File 'lib/opengraphplus/tag.rb', line 14 def %(<meta property="#{escape property}" content="#{escape content}">) end |
#render_in(_view_context = nil) ⇒ Object
18 19 20 |
# File 'lib/opengraphplus/tag.rb', line 18 def render_in(_view_context = nil) .html_safe end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/opengraphplus/tag.rb', line 22 def to_s end |