Class: MetaTags::Tag
- Inherits:
-
Object
- Object
- MetaTags::Tag
- Defined in:
- lib/meta_tags/tag.rb
Overview
Represents an HTML meta tag with no content (<tag />).
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, attributes = {}) ⇒ Tag
constructor
Initializes a new instance of Tag class.
-
#render(view) ⇒ String
Render tag into a Rails view.
Constructor Details
#initialize(name, attributes = {}) ⇒ Tag
Initializes a new instance of Tag class.
13 14 15 16 |
# File 'lib/meta_tags/tag.rb', line 13 def initialize(name, attributes = {}) @name = name.to_s @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/meta_tags/tag.rb', line 6 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/meta_tags/tag.rb', line 6 def name @name end |