Class: MiddlemanToc::Tag
- Inherits:
-
Struct
- Object
- Struct
- MiddlemanToc::Tag
- Defined in:
- lib/middleman_toc/tag.rb
Defined Under Namespace
Classes: Attr
Instance Attribute Summary collapse
-
#attrs ⇒ Object
writeonly
Sets the attribute attrs.
-
#content ⇒ Object
Returns the value of attribute content.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#attrs=(value) ⇒ Object
Sets the attribute attrs
2 3 4 |
# File 'lib/middleman_toc/tag.rb', line 2 def attrs=(value) @attrs = value end |
#content ⇒ Object
Returns the value of attribute content
2 3 4 |
# File 'lib/middleman_toc/tag.rb', line 2 def content @content end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/middleman_toc/tag.rb', line 2 def name @name end |
Instance Method Details
#render ⇒ Object
6 7 8 |
# File 'lib/middleman_toc/tag.rb', line 6 def render "<#{name} #{attrs}".strip + ">\n#{indent(content)}\n</#{name}>" end |