Class: RedQuilt::Line
- Inherits:
-
Struct
- Object
- Struct
- RedQuilt::Line
- Defined in:
- lib/red_quilt/line.rb
Overview
A single source line as seen by the block parser and its collaborators (Blockquote, List). ‘content` is the line text with any container prefix already stripped; `start_byte`/`end_byte` locate it in the original source. `blank` marks whitespace-only lines and `lazy_continuation` flags lines folded into an open paragraph.
Positional (not keyword_init): one Line is built per source line, so the ~2.5x faster positional constructor matters on large documents. Argument order: content, start_byte, end_byte, blank, lazy_continuation.
Instance Attribute Summary collapse
-
#blank ⇒ Object
Returns the value of attribute blank.
-
#content ⇒ Object
Returns the value of attribute content.
-
#end_byte ⇒ Object
Returns the value of attribute end_byte.
-
#lazy_continuation ⇒ Object
Returns the value of attribute lazy_continuation.
-
#start_byte ⇒ Object
Returns the value of attribute start_byte.
Instance Attribute Details
#blank ⇒ Object
Returns the value of attribute blank
13 14 15 |
# File 'lib/red_quilt/line.rb', line 13 def blank @blank end |
#content ⇒ Object
Returns the value of attribute content
13 14 15 |
# File 'lib/red_quilt/line.rb', line 13 def content @content end |
#end_byte ⇒ Object
Returns the value of attribute end_byte
13 14 15 |
# File 'lib/red_quilt/line.rb', line 13 def end_byte @end_byte end |
#lazy_continuation ⇒ Object
Returns the value of attribute lazy_continuation
13 14 15 |
# File 'lib/red_quilt/line.rb', line 13 def lazy_continuation @lazy_continuation end |
#start_byte ⇒ Object
Returns the value of attribute start_byte
13 14 15 |
# File 'lib/red_quilt/line.rb', line 13 def start_byte @start_byte end |