Class: Yaml::Converter::Parser::Token

Inherits:
Struct
  • Object
show all
Defined in:
lib/yaml/converter/parser.rb

Overview

Lightweight token structure used by the parser/state machine pipeline.

Instance Attribute Summary collapse

Instance Attribute Details

#metaHash?

Returns Optional metadata bag (currently unused).

Returns:

  • (Hash, nil)

    Optional metadata bag (currently unused)



23
# File 'lib/yaml/converter/parser.rb', line 23

Token = Struct.new(:type, :text, :meta, keyword_init: true)

#textString

Returns Payload string for this token.

Returns:

  • (String)

    Payload string for this token



23
# File 'lib/yaml/converter/parser.rb', line 23

Token = Struct.new(:type, :text, :meta, keyword_init: true)

#typeSymbol

Returns One of :blank, :title, :validation, :separator, :dash_heading, :yaml_line, :note.

Returns:

  • (Symbol)

    One of :blank, :title, :validation, :separator, :dash_heading, :yaml_line, :note



23
# File 'lib/yaml/converter/parser.rb', line 23

Token = Struct.new(:type, :text, :meta, keyword_init: true)