enum

Oyl::Dialect

Inherits Enum < Comparable < Value < Object

What varies between YAML worlds: the types plain scalars resolve to, a few syntax leniencies, and how << merges. A document chooses YAML 1.1 with a %YAML 1.1 directive; the parser's dialect reads the others.

Constants

YAML12 = 0

YAML 1.2 with its Core schema: null, ~ and empty; true and false; decimal, 0o and 0x integers; floats, .inf and .nan. Everything else, dates included, is a string.

YAML11 = 1

YAML 1.1 as PyYAML reads it: also yes/no/on/off, 0-octal, 0b binary, base 60 and timestamps.

GOYAML2 = 2

go-yaml v2's types, as Kubernetes reads YAML: YAML 1.1's and y/n. (Its merge order, where a << overrides the keys written before it, is applied by Oyl.yaml_to_json, not yet by Oyl.parse, whose merges keep the keys written, as YAML's do.)

Instance methods

goyaml2?

Returns true if this enum value equals GOYAML2

Source
to_unsafe
Source
value(scalar : Nodes::Scalar) : Nil | Bool | Int64 | UInt64 | Float64 | String | Time | Bytes

The value of scalar in this dialect: resolved by its types when plain and untagged, read by its tag's rules when tagged, and a string when quoted. Raises Oyl::ParseException for a tagged scalar its tag doesn't accept, as !!int abc.

Source
yaml11?

Returns true if this enum value equals YAML11

Source
yaml12?

Returns true if this enum value equals YAML12

Source