A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.ruby-lang.org/en/3.4/Psych/Nodes/Node.html below:

class Psych::Nodes::Node - Documentation for Ruby 3.4

  1. Psych::
  2. Nodes::
  3. Node
class Psych::Nodes::Node

The base class for any Node in a YAML parse tree. This class should never be instantiated.

Attributes

The children of this node

The column number where this node ends

The line number where this node ends

The column number where this node start

The line number where this node start

Public Class Methods Public Instance Methods

Source

def document?; false; end

Source

def each &block
  return enum_for :each unless block_given?
  Visitors::DepthFirst.new(block).accept self
end

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

Source

def sequence?; false; end

Source

def to_ruby(symbolize_names: false, freeze: false, strict_integer: false)
  Visitors::ToRuby.create(symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer).accept(self)
end

Convert this node to Ruby.

See also Psych::Visitors::ToRuby

Source

def yaml io = nil, options = {}
  require "stringio"
  real_io = io || StringIO.new(''.encode('utf-8'))

  Visitors::Emitter.new(real_io, options).accept self
  return real_io.string unless io
  io
end

Convert this node to YAML.

See also Psych::Visitors::Emitter


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4