| Server IP : 181.215.205.78 / Your IP : 216.73.216.146 Web Server : LiteSpeed System : Linux srv028146260 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64 User : situs1068 ( 1161) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/ruby/3.0.0/psych/nodes/ |
Upload File : |
# frozen_string_literal: true
module Psych
module Nodes
###
# This class represents a {YAML Scalar}[http://yaml.org/spec/1.1/#id858081].
#
# This node type is a terminal node and should not have any children.
class Scalar < Psych::Nodes::Node
# Any style scalar, the emitter chooses
ANY = 0
# Plain scalar style
PLAIN = 1
# Single quoted style
SINGLE_QUOTED = 2
# Double quoted style
DOUBLE_QUOTED = 3
# Literal style
LITERAL = 4
# Folded style
FOLDED = 5
# The scalar value
attr_accessor :value
# The anchor value (if there is one)
attr_accessor :anchor
# The tag value (if there is one)
attr_accessor :tag
# Is this a plain scalar?
attr_accessor :plain
# Is this scalar quoted?
attr_accessor :quoted
# The style of this scalar
attr_accessor :style
###
# Create a new Psych::Nodes::Scalar object.
#
# +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 Also
#
# See also Psych::Handler#scalar
def initialize value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY
@value = value
@anchor = anchor
@tag = tag
@plain = plain
@quoted = quoted
@style = style
end
def scalar?; true; end
end
end
end