Module: RedQuilt::NodeType

Defined in:
sig/red_quilt.rbs,
lib/red_quilt/node_type.rb

Overview

Integer NodeType constants (block: 1, 10-22; inline: 100-112).

Constant Summary collapse

DOCUMENT =

Returns:

  • (Integer)
1
PARAGRAPH =

Returns:

  • (Integer)
10
HEADING =

Returns:

  • (Integer)
11
THEMATIC_BREAK =

Returns:

  • (Integer)
12
BLOCKQUOTE =

Returns:

  • (Integer)
13
LIST =

Returns:

  • (Integer)
14
LIST_ITEM =

Returns:

  • (Integer)
15
CODE_BLOCK =

Returns:

  • (Integer)
16
HTML_BLOCK =

Returns:

  • (Integer)
17
TABLE =

Returns:

  • (Integer)
18
TABLE_ROW =

Returns:

  • (Integer)
19
TABLE_CELL =

Returns:

  • (Integer)
20
FOOTNOTE_DEFINITION =

Returns:

  • (Integer)
21
FOOTNOTES_SECTION =

Returns:

  • (Integer)
22
TEXT =

Returns:

  • (Integer)
100
SOFTBREAK =

Returns:

  • (Integer)
101
HARDBREAK =

Returns:

  • (Integer)
102
EMPHASIS =

Returns:

  • (Integer)
103
STRONG =

Returns:

  • (Integer)
104
CODE_SPAN =

Returns:

  • (Integer)
105
106
IMAGE =

Returns:

  • (Integer)
107
HTML_INLINE =

Returns:

  • (Integer)
109
STRIKETHROUGH =

Returns:

  • (Integer)
111
FOOTNOTE_REFERENCE =

Returns:

  • (Integer)
112
TYPE_NAMES =

Returns:

  • (Hash[Integer, Symbol])
{
  DOCUMENT => :document,
  PARAGRAPH => :paragraph,
  HEADING => :heading,
  THEMATIC_BREAK => :thematic_break,
  BLOCKQUOTE => :blockquote,
  LIST => :list,
  LIST_ITEM => :list_item,
  CODE_BLOCK => :code_block,
  HTML_BLOCK => :html_block,
  TABLE => :table,
  TABLE_ROW => :table_row,
  TABLE_CELL => :table_cell,
  FOOTNOTE_DEFINITION => :footnote_definition,
  FOOTNOTES_SECTION => :footnotes_section,
  TEXT => :text,
  SOFTBREAK => :softbreak,
  HARDBREAK => :hardbreak,
  EMPHASIS => :emphasis,
  STRONG => :strong,
  CODE_SPAN => :code_span,
  LINK => :link,
  IMAGE => :image,
  HTML_INLINE => :html_inline,
  STRIKETHROUGH => :strikethrough,
  FOOTNOTE_REFERENCE => :footnote_reference,
}.freeze

Class Method Summary collapse

Class Method Details

.name_for(type) ⇒ Symbol

Parameters:

  • type (Integer)

Returns:

  • (Symbol)


62
63
64
# File 'lib/red_quilt/node_type.rb', line 62

def name_for(type)
  TYPE_NAMES.fetch(type)
end