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.0/Psych/Nodes/Node.html below:

class Psych::Nodes::Node - RDoc Documentation

Attributes

children[R]

The children of this node

end_column[RW]

The column number where this node ends

end_line[RW]

The line number where this node ends

start_column[RW]

The column number where this node start

start_line[RW]

The line number where this node start

Public Class Methods

new() click to toggle source

Public Instance Methods

alias?() click to toggle source

document?() click to toggle source

def document?; false; end

each(&block) click to toggle source

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

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

mapping?() click to toggle source

scalar?() click to toggle source

sequence?() click to toggle source

def sequence?; false; end

stream?() click to toggle source

to_ruby(symbolize_names: false, freeze: false) click to toggle source

Convert this node to Ruby.

See also Psych::Visitors::ToRuby

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

to_yaml(io = nil, options = {})

transform(symbolize_names: false, freeze: false)

yaml(io = nil, options = {}) click to toggle source

Convert this node to YAML.

See also Psych::Visitors::Emitter

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

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

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