class TOML::KeyValueLine

Overview

A key = value line, possibly with a trailing comment.

The line is decomposed so the value can be replaced without losing the surrounding formatting:

leading_ws   key   eq_prefix_ws "=" eq_suffix_ws   value   trailing_raw

#trailing_raw covers any whitespace after the value, an optional inline # comment, and the line terminator.

Defined in:

toml/node.cr

Constructors

Instance Method Summary

Instance methods inherited from class TOML::Node

to_toml(io : IO) : Nil
to_toml : String
to_toml

Constructor Detail

def self.new(leading_ws : String, key : Key, eq_prefix_ws : String, eq_suffix_ws : String, value : Value, trailing_raw : String) #

[View source]

Instance Method Detail

def eq_prefix_ws : String #

[View source]
def eq_prefix_ws=(eq_prefix_ws : String) #

[View source]
def eq_suffix_ws : String #

[View source]
def eq_suffix_ws=(eq_suffix_ws : String) #

[View source]
def key : Key #

[View source]
def key=(key : Key) #

[View source]
def leading_ws : String #

[View source]
def leading_ws=(leading_ws : String) #

[View source]
def to_toml(io : IO) : Nil #

[View source]
def trailing_raw : String #

[View source]
def trailing_raw=(trailing_raw : String) #

[View source]
def value : Value #

[View source]
def value=(value : Value) #

[View source]