D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
ruby
/
json
/
add
/
Filename :
symbol.rb
back
Copy
#frozen_string_literal: false unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED require 'json' end class Symbol # Returns a hash, that will be turned into a JSON object and represent this # object. def as_json(*) { JSON.create_id => self.class.name, 's' => to_s, } end # Stores class name (Symbol) with String representation of Symbol as a JSON string. def to_json(*a) as_json.to_json(*a) end # Deserializes JSON string by converting the <tt>string</tt> value stored in the object to a Symbol def self.json_create(o) o['s'].to_sym end end
Name
Size
Last Modified
Owner
Permissions
Actions
bigdecimal.rb
0.584
KB
December 06 2024 2:24:35
root
0644
complex.rb
0.731
KB
December 06 2024 2:24:35
root
0644
core.rb
0.34
KB
December 06 2024 2:24:35
root
0644
date.rb
0.86
KB
December 06 2024 2:24:35
root
0644
date_time.rb
1.297
KB
December 06 2024 2:24:35
root
0644
exception.rb
0.78
KB
December 06 2024 2:24:35
root
0644
ostruct.rb
0.778
KB
December 06 2024 2:24:35
root
0644
range.rb
0.768
KB
December 06 2024 2:24:35
root
0644
rational.rb
0.762
KB
December 06 2024 2:24:35
root
0644
regexp.rb
0.742
KB
December 06 2024 2:24:35
root
0644
struct.rb
0.768
KB
December 06 2024 2:24:35
root
0644
symbol.rb
0.6
KB
December 06 2024 2:24:35
root
0644
time.rb
0.992
KB
December 06 2024 2:24:35
root
0644
2017 © D7net | D704T team