⚝
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
/
Comparable
/
View File Name :
cdesc-Comparable.ri
U:RDoc::NormalModule[iI"Comparable:ET@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"BThe Comparable mixin is used by classes whose objects may be ;TI"Cordered. The class must define the <code><=></code> operator, ;TI"Ewhich compares the receiver against another object, returning a ;TI"Jvalue less than 0, returning 0, or returning a value greater than 0, ;TI"?depending on whether the receiver is less than, equal to, ;TI"Bor greater than the other object. If the other object is not ;TI"Hcomparable then the <code><=></code> operator should return +nil+. ;TI"DComparable uses <code><=></code> to implement the conventional ;TI"<comparison operators (<code><</code>, <code><=</code>, ;TI"C<code>==</code>, <code>>=</code>, and <code>></code>) and the ;TI""method <code>between?</code>.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim;[I"class SizeMatters ;TI" include Comparable ;TI" attr :str ;TI" def <=>(other) ;TI"% str.size <=> other.str.size ;TI" end ;TI" def initialize(str) ;TI" @str = str ;TI" end ;TI" def inspect ;TI" @str ;TI" end ;TI" end ;TI" ;TI"s1 = SizeMatters.new("Z") ;TI" s2 = SizeMatters.new("YY") ;TI"!s3 = SizeMatters.new("XXX") ;TI""s4 = SizeMatters.new("WWWW") ;TI"#s5 = SizeMatters.new("VVVVV") ;TI" ;TI",s1 < s2 #=> true ;TI"-s4.between?(s1, s3) #=> false ;TI",s4.between?(s3, s5) #=> true ;TI"@[ s3, s2, s5, s4, s1 ].sort #=> [Z, YY, XXX, WWWW, VVVVV];T:@format0: @fileI" compar.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[[I"<;TI" compar.c;T[I"<=;T@I[I"==;T@I[I">;T@I[I">=;T@I[I" between?;T@I[I" clamp;T@I[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@4@4cRDoc::TopLevel