Sha256: 3a09f664986f3863f7b700bd35292664515e6c56eb17d722ed44303dd95dd312

Contents?: true

Size: 1.63 KB

Versions: 6227

Compression:

Stored size: 1.63 KB

Contents

# 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 indicating 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

Version data entries

6,227 entries across 6,224 versions & 22 rubygems

Version Path
cybrid_api_id_ruby-0.122.67 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.66 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.65 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.64 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.60 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.59 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_bank_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_organization_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.58 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb
cybrid_api_id_ruby-0.122.57 vendor/bundle/ruby/3.3.0/gems/psych-5.2.0/lib/psych/nodes/scalar.rb