module
KYAML::Scalar
Overview
Stateless rendering of KYAML scalar leaves and mapping keys, shared by the Emitter and Builder for consistency.
Every method writes directly to io.
indent is the callers current indentation level, used for multi-line flow-folded string layout.
Extended Modules
Defined in:
kyaml/scalar.crInstance Method Summary
-
#float(io : IO, value : Float64) : Nil
Renders value asa finite float.
-
#key(io : IO, key : String, indent : Int32 = 0) : Nil
Renders key, quoting only when it is not a safe plain key.
-
#safe_unquoted_key?(key : String) : Bool
Returns true if key is safe to emit as a plain unquoted KYAML key.
-
#string(io : IO, value : String, indent : Int32 = 0) : Nil
Renders value as a doublequoted string.
-
#write(io : IO, value : Nil, indent : Int32 = 0) : Nil
Renders a scalar leaf (
Nil,Bool,Int64,Float64,String) -
#write(io : IO, value : Bool, indent : Int32 = 0) : Nil
Renders a scalar leaf (
Nil,Bool,Int64,Float64,String) -
#write(io : IO, value : Int64, indent : Int32 = 0) : Nil
Renders a scalar leaf (
Nil,Bool,Int64,Float64,String) -
#write(io : IO, value : Float64, indent : Int32 = 0) : Nil
Renders a scalar leaf (
Nil,Bool,Int64,Float64,String) -
#write(io : IO, value : String, indent : Int32 = 0) : Nil
Renders a scalar leaf (
Nil,Bool,Int64,Float64,String)
Instance Method Detail
Renders value asa finite float.
Raises KYAML::Emitter on Ininity/NaN.
Renders key, quoting only when it is not a safe plain key.
Returns true if key is safe to emit as a plain unquoted KYAML key.
Renders value as a doublequoted string. Multiline strings use YAML flow-folding.
Renders a scalar leaf (Nil, Bool, Int64, Float64, String)
Renders a scalar leaf (Nil, Bool, Int64, Float64, String)
Renders a scalar leaf (Nil, Bool, Int64, Float64, String)
Renders a scalar leaf (Nil, Bool, Int64, Float64, String)
Renders a scalar leaf (Nil, Bool, Int64, Float64, String)