Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
ruby-hashery /
demo /
[ HOME SHELL ]
Name
Size
Permission
Action
applique
[ DIR ]
drwxr-xr-x
00_introduction.rdoc
159
B
-rw-r--r--
01_open_hash.rdoc
1.62
KB
-rw-r--r--
02_query_hash.rdoc
402
B
-rw-r--r--
03_casting_hash.rdoc
260
B
-rw-r--r--
04_static_hash.rdoc
385
B
-rw-r--r--
05_key_hash.rdoc
376
B
-rw-r--r--
06_open_cascade.rdoc
1.49
KB
-rw-r--r--
07_fuzzy_hash.rdoc
2.9
KB
-rw-r--r--
08_propery_hash.rdoc
715
B
-rw-r--r--
10_association.rdoc
1.17
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : 06_open_cascade.rdoc
= OpenCascade The reason this class is labeled "cascade", is that every internal Hash is transformed into an OpenCascade dynamically upon access. This makes it easy to create _cascading_ references. h = { :x => { :y => { :z => 1 } } } c = OpenCascade[h] assert c.x.y.z == 1 As soon as you access a node it automatically becomes an OpenCascade. c = OpenCascade.new assert(OpenCascade === c.r) assert(OpenCascade === c.a.b) But if you set a node, then that will be it's value. c.a.b = 4 assert c.a.b == 4 To query a node without causing the auto-creation of an OpenCasade object, use the ?-mark. assert c.a.z? == nil OpenCascade also transforms Hashes within Arrays. h = { :x=>[ {:a=>1}, {:a=>2} ], :y=>1 } c = OpenCascade[h] assert c.x.first.a == 1 assert c.x.last.a == 2 Like OpenObject, OpenCascade allows you to insert entries as array pairs. c = OpenCascade.new c << [:x,8] c << [:y,9] assert c.x == 8 assert c.y == 9 Finally, you can call methods ending in a !-mark to access the underlying hash (Note that these differ in behavior from the built-in !-methods). bk = c.map!{ |k,v| k.to_s.upcase } bk.sort.assert == ['X', 'Y'] So you can see that for the most an OpenCascade is just like OpenHash, but it allows us to conveniently build open sub-layers easily. Enumerable still works with OpenCascades too. h = {} c = OpenCascade[:a=>1,:b=>{:c=>3}] c.each do |k,v| h[k] = v end OpenCascade.assert === h[:b]
Close