$32 GRAYBYTE WORDPRESS FILE MANAGER $16

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby23/lib64/ruby/2.3.0/json/add/

HOME
Current File : /opt/alt/ruby23/lib64/ruby/2.3.0/json/add//struct.rb
# frozen_string_literal: false
unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  require 'json'
end

class Struct

  # Deserializes JSON string by constructing new Struct object with values
  # <tt>v</tt> serialized by <tt>to_json</tt>.
  def self.json_create(object)
    new(*object['v'])
  end

  # Returns a hash, that will be turned into a JSON object and represent this
  # object.
  def as_json(*)
    klass = self.class.name
    klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
    {
      JSON.create_id => klass,
      'v'            => values,
    }
  end

  # Stores class name (Struct) with Struct values <tt>v</tt> as a JSON string.
  # Only named structs are supported.
  def to_json(*args)
    as_json.to_json(*args)
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.43 PM
root / linksafe
0755
bigdecimal.rb
0.585 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
complex.rb
0.732 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
core.rb
0.341 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
date.rb
0.861 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
date_time.rb
1.298 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
exception.rb
0.781 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
ostruct.rb
0.779 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
range.rb
0.769 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
rational.rb
0.763 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
regexp.rb
0.743 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
struct.rb
0.769 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
symbol.rb
0.601 KB
26 Jul 2023 2.39 PM
root / linksafe
0644
time.rb
0.993 KB
26 Jul 2023 2.39 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF