403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.138.37.151
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hocon-1.3.1/lib/hocon/impl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hocon-1.3.1/lib/hocon/impl/config_string.rb
# encoding: utf-8

require 'hocon/impl'
require 'hocon/impl/abstract_config_value'
require 'hocon/config_value_type'
require 'hocon/impl/config_impl_util'

class Hocon::Impl::ConfigString
  include Hocon::Impl::AbstractConfigValue

  ConfigImplUtil = Hocon::Impl::ConfigImplUtil

  attr_reader :value

  class Quoted < Hocon::Impl::ConfigString
    def initialize(origin, value)
      super(origin, value)
    end

    def new_copy(origin)
      self.class.new(origin, @value)
    end

    private

    # serialization all goes through SerializedConfigValue
    def write_replace
      Hocon::Impl::SerializedConfigValue.new(self)
    end
  end

  # this is sort of a hack; we want to preserve whether whitespace
  # was quoted until we process substitutions, so we can ignore
  # unquoted whitespace when concatenating lists or objects.
  # We dump this distinction when serializing and deserializing,
  # but that 's OK because it isn' t in equals/hashCode, and we
  # don 't allow serializing unresolved objects which is where
  # quoted-ness matters. If we later make ConfigOrigin point
  # to the original token range, we could use that to implement
  # wasQuoted()
  class Unquoted < Hocon::Impl::ConfigString
    def initialize(origin, value)
      super(origin, value)
    end

    def new_copy(origin)
      self.class.new(origin, @value)
    end

    def write_replace
      Hocon::Impl::SerializedConfigValue.new(self)
    end
  end

  def was_quoted?
    self.is_a?(Quoted)
  end

  def value_type
    Hocon::ConfigValueType::STRING
  end

  def unwrapped
    @value
  end

  def transform_to_string
    @value
  end

  def render_value_to_sb(sb, indent_size, at_root, options)
    if options.json?
      sb << ConfigImplUtil.render_json_string(@value)
    else
      sb << ConfigImplUtil.render_string_unquoted_if_possible(@value)
    end
  end

  private

  def initialize(origin, value)
    super(origin)
    @value = value
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit