| Server IP : 51.79.230.26 / Your IP : 216.73.217.43 Web Server : LiteSpeed System : Linux sg2.exonhost.com 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : mukutpub ( 1151) PHP Version : 8.2.33 Disable Function : eval, show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, symlink, mail MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/proc/thread-self/root/opt/alt/ruby30/share/ruby/psych/nodes/ |
Upload File : |
# frozen_string_literal: true
module Psych
module Nodes
###
# This class represents a {YAML Mapping}[http://yaml.org/spec/1.1/#mapping].
#
# A Psych::Nodes::Mapping node may have 0 or more children, but must have
# an even number of children. Here are the valid children a
# Psych::Nodes::Mapping node may have:
#
# * Psych::Nodes::Sequence
# * Psych::Nodes::Mapping
# * Psych::Nodes::Scalar
# * Psych::Nodes::Alias
class Mapping < Psych::Nodes::Node
# Any Map Style
ANY = 0
# Block Map Style
BLOCK = 1
# Flow Map Style
FLOW = 2
# The optional anchor for this mapping
attr_accessor :anchor
# The optional tag for this mapping
attr_accessor :tag
# Is this an implicit mapping?
attr_accessor :implicit
# The style of this mapping
attr_accessor :style
###
# Create a new Psych::Nodes::Mapping object.
#
# +anchor+ is the anchor associated with the map or +nil+.
# +tag+ is the tag associated with the map or +nil+.
# +implicit+ is a boolean indicating whether or not the map was implicitly
# started.
# +style+ is an integer indicating the mapping style.
#
# == See Also
# See also Psych::Handler#start_mapping
def initialize anchor = nil, tag = nil, implicit = true, style = BLOCK
super()
@anchor = anchor
@tag = tag
@implicit = implicit
@style = style
end
def mapping?; true; end
end
end
end