Class: Ecrire::Markdown::Nodes::Heading

Inherits:
Ecrire::Markdown::Node show all
Defined in:
lib/ecrire/markdown/nodes/heading.rb

Instance Attribute Summary

Attributes inherited from Ecrire::Markdown::Node

#content

Instance Method Summary collapse

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_sObject



9
10
11
# File 'lib/ecrire/markdown/nodes/heading.rb', line 9

def to_s
  "<h#{@size}>#{@content}</h#{@size}>"
end