Results for: "Psych"

Iterate over each node in the tree. Yields each node to block depth first.

Convert path string to a class

No documentation available
No documentation available

Emit a map. The coder will be yielded to the block.

Emit a scalar with value

Emit a map with value

No documentation available
No documentation available
No documentation available

Emit a sequence of list

No documentation available

Called when an alias is found to anchor. anchor will be the name of the anchor found.

Example

Here we have an example of an array that references itself in YAML:

--- &ponies
- first element
- *ponies

&ponies is the anchor, *ponies is the alias. In this case, alias is called with “ponies”.

Called when a scalar value is found. The scalar may have an anchor, a tag, be implicitly plain or implicitly quoted

value is the string value of the scalar anchor is an associated anchor or nil tag is an associated tag or nil plain is a boolean value quoted is a boolean value style is an integer idicating the string style

See the constants in Psych::Nodes::Scalar for the possible values of style

Example

Here is a YAML document that exercises most of the possible ways this method can be called:

---
- !str "foo"
- &anchor fun
- many
  lines
- |
  many
  newlines

The above YAML document contains a list with four strings. Here are the parameters sent to this method in the same order:

# value               anchor    tag     plain   quoted  style
["foo",               nil,      "!str", false,  false,  3    ]
["fun",               "anchor", nil,    true,   false,  1    ]
["many lines",        nil,      nil,    true,   false,  1    ]
["many\nnewlines\n",  nil,      nil,    false,  true,   4    ]

Called when an empty event happens. (Which, as far as I can tell, is never).

Is this handler a streaming handler?

Creates a new Psych::Parser instance with handler. YAML events will be called on handler. See Psych::Parser for more details.

Parse the YAML document contained in yaml. Events will be called on the handler set on the parser instance.

See Psych::Parser and Psych::Parser#handler

Returns a Psych::Parser::Mark object that contains line, column, and index information.

Create a new scanner

Tokenize string returning the Ruby object

No documentation available

Create a new TreeBuilder instance

No documentation available
No documentation available
Search took: 3ms  ·  Total Results: 1038