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.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby32 /
share /
ri /
system /
Struct /
Delete
Unzip
Name
Size
Permission
Date
Action
%3d%3d-i.ri
1022
B
-rw-r--r--
2026-04-07 17:42
%5b%5d%3d-i.ri
1.33
KB
-rw-r--r--
2026-04-07 17:42
%5b%5d-i.ri
999
B
-rw-r--r--
2026-04-07 17:42
as_json-i.ri
374
B
-rw-r--r--
2026-04-07 17:42
cdesc-Struct.ri
5.77
KB
-rw-r--r--
2026-04-07 17:42
deconstruct-i.ri
698
B
-rw-r--r--
2026-04-07 17:42
deconstruct_keys-i.ri
911
B
-rw-r--r--
2026-04-07 17:42
dig-i.ri
1.25
KB
-rw-r--r--
2026-04-07 17:42
each-i.ri
795
B
-rw-r--r--
2026-04-07 17:42
each_pair-i.ri
892
B
-rw-r--r--
2026-04-07 17:42
eql%3f-i.ri
1012
B
-rw-r--r--
2026-04-07 17:42
filter-i.ri
882
B
-rw-r--r--
2026-04-07 17:42
hash-i.ri
892
B
-rw-r--r--
2026-04-07 17:42
inspect-i.ri
715
B
-rw-r--r--
2026-04-07 17:42
json_create-c.ri
420
B
-rw-r--r--
2026-04-07 17:42
keyword_init%3f-c.ri
771
B
-rw-r--r--
2026-04-07 17:42
length-i.ri
574
B
-rw-r--r--
2026-04-07 17:42
members-c.ri
543
B
-rw-r--r--
2026-04-07 17:42
members-i.ri
551
B
-rw-r--r--
2026-04-07 17:42
new-c.ri
5.45
KB
-rw-r--r--
2026-04-07 17:42
select-i.ri
940
B
-rw-r--r--
2026-04-07 17:42
size-i.ri
594
B
-rw-r--r--
2026-04-07 17:42
to_a-i.ri
732
B
-rw-r--r--
2026-04-07 17:42
to_h-i.ri
1.08
KB
-rw-r--r--
2026-04-07 17:42
to_json-i.ri
405
B
-rw-r--r--
2026-04-07 17:42
to_s-i.ri
688
B
-rw-r--r--
2026-04-07 17:42
values-i.ri
688
B
-rw-r--r--
2026-04-07 17:42
values_at-i.ri
1.63
KB
-rw-r--r--
2026-04-07 17:42
Save
Rename
U:RDoc::AnyMethod[iI"new:ETI"Struct::new;TT:privateo:RDoc::Markup::Document:@parts[/o:RDoc::Markup::Paragraph; [I"O<tt>Struct.new</tt> returns a new subclass of +Struct+. The new subclass:;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"BMay be anonymous, or may have the name given by +class_name+.;To;;0; [o; ; [I"1May have members as given by +member_names+.;To;;0; [o; ; [I"MMay have initialization via ordinary arguments, or via keyword arguments;T@o; ; [I">The new subclass has its own method <tt>::new</tt>; thus:;T@o:RDoc::Markup::Verbatim; [I":Foo = Struct.new('Foo', :foo, :bar) # => Struct::Foo ;TI"Qf = Foo.new(0, 1) # => #<struct Struct::Foo foo=0, bar=1> ;T:@format0o; ; [I"<b>\Class Name</b>;T@o; ; [I"(With string argument +class_name+, ;TI"Sreturns a new subclass of +Struct+ named <tt>Struct::<em>class_name</em></tt>:;T@o;; [I":Foo = Struct.new('Foo', :foo, :bar) # => Struct::Foo ;TI"<Foo.name # => "Struct::Foo" ;TI"5Foo.superclass # => Struct ;T;0o; ; [I"+Without string argument +class_name+, ;TI"2returns a new anonymous subclass of +Struct+:;T@o;; [I"*Struct.new(:foo, :bar).name # => nil ;T;0o; ; [I"<b>Block</b>;T@o; ; [I"FWith a block given, the created subclass is yielded to the block:;T@o;; [I"GCustomer = Struct.new('Customer', :name, :address) do |new_class| ;TI", p "The new subclass is #{new_class}" ;TI" def greeting ;TI"' "Hello #{name} at #{address}" ;TI" end ;TI")end # => Struct::Customer ;TI"-dave = Customer.new('Dave', '123 Main') ;TI"Ndave # => #<struct Struct::Customer name="Dave", address="123 Main"> ;TI"1dave.greeting # => "Hello Dave at 123 Main" ;T;0o; ; [I"&Output, from <tt>Struct.new</tt>:;T@o;; [I","The new subclass is Struct::Customer" ;T;0o; ; [I"<b>Member Names</b>;T@o; ; [I"&\Symbol arguments +member_names+ ;TI"0determines the members of the new subclass:;T@o;; [I"=Struct.new(:foo, :bar).members # => [:foo, :bar] ;TI"=Struct.new('Foo', :foo, :bar).members # => [:foo, :bar] ;T;0o; ; [I"KThe new subclass has instance methods corresponding to +member_names+:;T@o;; [ I")Foo = Struct.new('Foo', :foo, :bar) ;TI"AFoo.instance_methods(false) # => [:foo, :bar, :foo=, :bar=] ;TI"Mf = Foo.new # => #<struct Struct::Foo foo=nil, bar=nil> ;TI"*f.foo # => nil ;TI"(f.foo = 0 # => 0 ;TI"*f.bar # => nil ;TI"(f.bar = 1 # => 1 ;TI"If # => #<struct Struct::Foo foo=0, bar=1> ;T;0o; ; [I"<b>Singleton Methods</b>;T@o; ; [I"CA subclass returned by Struct.new has these singleton methods:;T@o;; ;;[o;;0; [ o; ; [I"A\Method <tt>::new </tt> creates an instance of the subclass:;T@o;; [I"BFoo.new # => #<struct Struct::Foo foo=nil, bar=nil> ;TI"@Foo.new(0) # => #<struct Struct::Foo foo=0, bar=nil> ;TI">Foo.new(0, 1) # => #<struct Struct::Foo foo=0, bar=1> ;TI"BFoo.new(0, 1, 2) # Raises ArgumentError: struct size differs ;TI" ;TI".# Initialization with keyword arguments: ;TI"GFoo.new(foo: 0) # => #<struct Struct::Foo foo=0, bar=nil> ;TI"EFoo.new(foo: 0, bar: 1) # => #<struct Struct::Foo foo=0, bar=1> ;TI"%Foo.new(foo: 0, bar: 1, baz: 2) ;TI"3# Raises ArgumentError: unknown keywords: baz ;T;0o; ; [I"A\Method <tt>::[]</tt> is an alias for method <tt>::new</tt>.;T@o;;0; [o; ; [I"O\Method <tt>:inspect</tt> returns a string representation of the subclass:;T@o;; [I"Foo.inspect ;TI"# => "Struct::Foo" ;T;0o;;0; [o; ; [I"E\Method <tt>::members</tt> returns an array of the member names:;T@o;; [I"#Foo.members # => [:foo, :bar] ;T;0o; ; [I"<b>Keyword Argument</b>;T@o; ; [I"PBy default, the arguments for initializing an instance of the new subclass ;TI"2can be both positional and keyword arguments.;T@o; ; [I"OOptional keyword argument <tt>keyword_init:</tt> allows to force only one ;TI"&type of arguments to be accepted:;T@o;; [I"?KeywordsOnly = Struct.new(:foo, :bar, keyword_init: true) ;TI"&KeywordsOnly.new(bar: 1, foo: 0) ;TI".# => #<struct KeywordsOnly foo=0, bar=1> ;TI"KeywordsOnly.new(0, 1) ;TI"7# Raises ArgumentError: wrong number of arguments ;TI" ;TI"BPositionalOnly = Struct.new(:foo, :bar, keyword_init: false) ;TI"PositionalOnly.new(0, 1) ;TI"0# => #<struct PositionalOnly foo=0, bar=1> ;TI"(PositionalOnly.new(bar: 1, foo: 0) ;TI"C# => #<struct PositionalOnly foo={:foo=>1, :bar=>2}, bar=nil> ;TI"M# Note that no error is raised, but arguments treated as one hash value ;TI" ;TI"+# Same as not providing keyword_init: ;TI"5Any = Struct.new(:foo, :bar, keyword_init: nil) ;TI"Any.new(foo: 1, bar: 2) ;TI"%# => #<struct Any foo=1, bar=2> ;TI"Any.new(1, 2) ;TI"$# => #<struct Any foo=1, bar=2>;T;0: @fileI" struct.c;T:0@omit_headings_from_table_of_contents_below0I"?Struct.new(*member_names, keyword_init: false){|Struct_subclass| ... } -> Struct_subclass Struct.new(class_name, *member_names, keyword_init: false){|Struct_subclass| ... } -> Struct_subclass Struct_subclass.new(*member_names) -> Struct_subclass_instance Struct_subclass.new(**member_names) -> Struct_subclass_instance ;T0[ I"(p1, *args, p3 = {});T@�FI"Struct;TcRDoc::NormalClass00