⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
DidYouMean
/
View File Name :
cdesc-DidYouMean.ri
U:RDoc::NormalModule[iI"DidYouMean:ET@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"NThe +DidYouMean+ gem adds functionality to suggest possible method/class ;TI"Onames upon errors such as +NameError+ and +NoMethodError+. In Ruby 2.3 or ;TI"9later, it is automatically activated during startup.;To:RDoc::Markup::BlankLine o; ;[I" @example;T@o:RDoc::Markup::Verbatim;[!I" methosd ;TI"R# => NameError: undefined local variable or method `methosd' for main:Object ;TI" # Did you mean? methods ;TI"# method ;TI" ;TI"OBject ;TI"3# => NameError: uninitialized constant OBject ;TI" # Did you mean? Object ;TI" ;TI"#@full_name = "Yuki Nishijima" ;TI"2first_name, last_name = full_name.split(" ") ;TI"T# => NameError: undefined local variable or method `full_name' for main:Object ;TI"$# Did you mean? @full_name ;TI" ;TI"$@@full_name = "Yuki Nishijima" ;TI"@@full_anme ;TI"H# => NameError: uninitialized class variable @@full_anme in Object ;TI"%# Did you mean? @@full_name ;TI" ;TI""full_name = "Yuki Nishijima" ;TI"!full_name.starts_with?("Y") ;TI"U# => NoMethodError: undefined method `starts_with?' for "Yuki Nishijima":String ;TI"%# Did you mean? start_with? ;TI" ;TI"%hash = {foo: 1, bar: 2, baz: 3} ;TI"hash.fetch(:fooo) ;TI")# => KeyError: key not found: :fooo ;TI"# Did you mean? :foo ;T:@format0S:RDoc::Markup::Heading: leveli: textI"Disabling +did_you_mean+;T@o; ;[I"KOccasionally, you may want to disable the +did_you_mean+ gem for e.g. ;TI"Qdebugging issues in the error object itself. You can disable it entirely by ;TI"Fspecifying +--disable-did_you_mean+ option to the +ruby+ command:;T@o;;[I"0$ ruby --disable-did_you_mean -e "1.zeor?" ;TI"J-e:1:in `<main>': undefined method `zeor?' for 1:Integer (NameError) ;T;0o; ;[I"DWhen you do not have direct access to the +ruby+ command (e.g. ;TI"I+rails console+, +irb+), you could applyoptions using the +RUBYOPT+ ;TI"environment variable:;T@o;;[I",$ RUBYOPT='--disable-did_you_mean' irb ;TI"irb:0> 1.zeor? ;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer) ;T;0S; ;i;I"'Getting the original error message;T@o; ;[I"QSometimes, you do not want to disable the gem entirely, but need to get the ;TI"Roriginal error message without suggestions (e.g. testing). In this case, you ;TI"Bcould use the +#original_message+ method on the error object:;T@o;;[I"no_method_error = begin ;TI"! 1.zeor? ;TI"5 rescue NoMethodError => error ;TI" error ;TI" end ;TI" ;TI"no_method_error.message ;TI"A# => NoMethodError (undefined method `zeor?' for 1:Integer) ;TI"# Did you mean? zero? ;TI" ;TI"&no_method_error.original_message ;TI"@# => NoMethodError (undefined method `zeor?' for 1:Integer);T;0: @fileI"lib/did_you_mean.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [U:RDoc::Constant[i I"SPELL_CHECKERS;TI"DidYouMean::SPELL_CHECKERS;T:public0o;;[o; ;[I"2Map of error types and spell checker objects.;T;@];0@]@cRDoc::NormalModule0[ [[I" class;T[[;[[I"correct_error;TI"lib/did_you_mean.rb;T[I"formatter;T@s[I"formatter=;T@s[:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@]I"lib/optparse.rb;T@]cRDoc::TopLevel