Class: Ecrire::Markdown::Nodes::Heading
- Inherits:
-
Ecrire::Markdown::Node
- Object
- Ecrire::Markdown::Node
- Ecrire::Markdown::Nodes::Heading
- Defined in:
- lib/ecrire/markdown/nodes/heading.rb
Instance Attribute Summary
Attributes inherited from Ecrire::Markdown::Node
Instance Method Summary collapse
-
#initialize(size, content) ⇒ Heading
constructor
A new instance of Heading.
- #to_s ⇒ Object
Constructor Details
#initialize(size, content) ⇒ Heading
4 5 6 7 |
# File 'lib/ecrire/markdown/nodes/heading.rb', line 4 def initialize(size, content) @size = size @content = content end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/ecrire/markdown/nodes/heading.rb', line 9 def to_s "<h#{@size}>#{@content}</h#{@size}>" end |