Class: RedQuilt::Line

Inherits:
Struct
  • Object
show all
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

Instance Attribute Details

#blankObject

Returns the value of attribute blank

Returns:

  • (Object)

    the current value of blank



13
14
15
# File 'lib/red_quilt/line.rb', line 13

def blank
  @blank
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



13
14
15
# File 'lib/red_quilt/line.rb', line 13

def content
  @content
end

#end_byteObject

Returns the value of attribute end_byte

Returns:

  • (Object)

    the current value of end_byte



13
14
15
# File 'lib/red_quilt/line.rb', line 13

def end_byte
  @end_byte
end

#lazy_continuationObject

Returns the value of attribute lazy_continuation

Returns:

  • (Object)

    the current value of lazy_continuation



13
14
15
# File 'lib/red_quilt/line.rb', line 13

def lazy_continuation
  @lazy_continuation
end

#start_byteObject

Returns the value of attribute start_byte

Returns:

  • (Object)

    the current value of start_byte



13
14
15
# File 'lib/red_quilt/line.rb', line 13

def start_byte
  @start_byte
end