Class: Markbridge::AST::Heading
- Defined in:
- lib/markbridge/ast/heading.rb
Overview
Represents a heading element with a level (1-6).
Instance Attribute Summary collapse
-
#level ⇒ Integer
readonly
The heading level (1-6).
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(level:) ⇒ Heading
constructor
Create a new heading element.
Methods inherited from Element
Constructor Details
#initialize(level:) ⇒ Heading
Create a new heading element.
17 18 19 20 |
# File 'lib/markbridge/ast/heading.rb', line 17 def initialize(level:) super() @level = level end |
Instance Attribute Details
#level ⇒ Integer (readonly)
Returns the heading level (1-6).
12 13 14 |
# File 'lib/markbridge/ast/heading.rb', line 12 def level @level end |