403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.220.96.214
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/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/multi_json-1.15.0/lib/multi_json/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/multi_json-1.15.0/lib/multi_json//adapter.rb
require 'singleton'
require 'multi_json/options'

module MultiJson
  class Adapter
    extend Options
    include Singleton

    class << self
      def defaults(action, value)
        metaclass = class << self; self; end

        metaclass.instance_eval do
          define_method("default_#{action}_options") { value }
        end
      end

      def load(string, options = {})
        string = string.read if string.respond_to?(:read)
        fail self::ParseError if blank?(string)
        instance.load(string, cached_load_options(options))
      end

      def dump(object, options = {})
        instance.dump(object, cached_dump_options(options))
      end

    private

      def blank?(input)
        input.nil? || /\A\s*\z/ === input
      rescue ArgumentError # invalid byte sequence in UTF-8
        false
      end

      def cached_dump_options(options)
        OptionsCache.fetch(:dump, options) do
          dump_options(options).merge(MultiJson.dump_options(options)).merge!(options)
        end
      end

      def cached_load_options(options)
        OptionsCache.fetch(:load, options) do
          load_options(options).merge(MultiJson.load_options(options)).merge!(options)
        end
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit