ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
PK kq]i length-i.rinu [ U:RDoc::AnyMethod[iI"length:ETI"Set#length;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass0[@FI" size;TPK kq]Ӈun n proper_superset%3f-i.rinu [ U:RDoc::AnyMethod[iI"proper_superset?:ETI"Set#proper_superset?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"CReturns true if the set is a proper superset of the given set.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I">;To;; [ ;@;0I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]I&h h proper_subset%3f-i.rinu [ U:RDoc::AnyMethod[iI"proper_subset?:ETI"Set#proper_subset?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"AReturns true if the set is a proper subset of the given set.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<;To;; [ ;@;0I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]pȞ
reset-i.rinu [ U:RDoc::AnyMethod[iI"
reset:ETI"Set#reset;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"XResets the internal state after modification to existing elements
and returns self.;To;
; [I"1Elements will be reindexed and deduplicated.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]$M+ M+ cdesc-Set.rinu [ U:RDoc::NormalClass[iI"Set:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below0o;;[)o:RDoc::Markup::Paragraph;[I"This library provides the Set class, which deals with a collection
of unordered values with no duplicates. It is a hybrid of Array's
intuitive inter-operation facilities and Hash's fast lookup.;To;;[I"KThe method to_set is added to Enumerable for convenience.;To;;[I"Set implements a collection of unordered values with no duplicates.
This is a hybrid of Array's intuitive inter-operation facilities and
Hash's fast lookup.;To;;[I"Set is easy to use with Enumerable objects (implementing each).
Most of the initializer methods and binary operators accept generic
Enumerable objects besides sets and arrays. An Enumerable object
can be converted to Set using the to_set method.;To;;[I"ESet uses Hash as storage, so you must note the following points:;To:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;;[I"Equality of elements is determined according to Object#eql? and
Object#hash. Use Set#compare_by_identity to make a set compare
its elements by their identity.;To;;0;[o;;[I"Set assumes that the identity of each element does not change
while it is stored. Modifying an element of a set will render the
set to an unreliable state.;To;;0;[o;;[I"{When a string is to be stored, a frozen copy of the string is
stored instead unless the original string is already frozen.;TS:RDoc::Markup::Heading:
leveli: textI"Comparison;To;;[I"\The comparison operators <, >, <=, and >= are implemented as
shorthand for the {proper_,}{subset?,superset?} methods. The <=>
operator reflects this order, or return nil for sets that both
have distinct elements ({x, y} vs. {x, z} for example).;TS;;i;I"Example;To:RDoc::Markup::Verbatim;[I"require 'set'
s1 = Set[1, 2] #=> #
s2 = [1, 2].to_set #=> #
s1 == s2 #=> true
s1.add("foo") #=> #
s1.merge([2, 6]) #=> #
s1.subset?(s2) #=> false
s2.subset?(s1) #=> true
;T:@format: rubyS;;i;I"Contact;To;;
;;[o;;0;[o;;[I"AAkinori MUSHA (current maintainer);TS;;i;I"What's Here;To;;[I"*First, what's elsewhere. \Class \Set:;To;;
;;[o;;0;[o;;[I"uInherits from {class Object}[https://docs.ruby-lang.org/en/master/Object.html#class-Object-label-What-27s+Here].;To;;0;[o;;[I"Includes {module Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html#module-Enumerable-label-What-27s+Here],
which provides dozens of additional methods.;To;;[I"In particular, class \Set does not have many methods of its own
for fetching or for iterating.
Instead, it relies on those in \Enumerable.;To;;[I";Here, class \Set provides methods that are useful for:;To;;
;;[o;;0;[o;;[I"B{Creating a Set}[#class-Set-label-Methods+for+Creating+a+Set];To;;0;[o;;[I"B{Set Operations}[#class-Set-label-Methods+for+Set+Operations];To;;0;[o;;[I"8{Comparing}[#class-Set-label-Methods+for+Comparing];To;;0;[o;;[I"6{Querying}[#class-Set-label-Methods+for+Querying];To;;0;[o;;[I"8{Assigning}[#class-Set-label-Methods+for+Assigning];To;;0;[o;;[I"6{Deleting}[#class-Set-label-Methods+for+Deleting];To;;0;[o;;[I":{Converting}[#class-Set-label-Methods+for+Converting];To;;0;[o;;[I"8{Iterating}[#class-Set-label-Methods+for+Iterating];To;;0;[o;;[I"3{And more....}[#class-Set-label-Other+Methods];TS;;i;I" Methods for Creating a \Set;To;;
;;[o;;0;[o;;[I"<::[] -
Returns a new set containing the given objects.;To;;0;[o;;[I"::new -
Returns a new set containing either the given objects
(if no block given) or the return values from the called block
(if a block given).;TS;;i;I" Methods for \Set Operations;To;;
;;[ o;;0;[o;;[I"{|}[#method-i-7C] (aliased as #union and #+) -
Returns a new set containing all elements from +self+
and all elements from a given enumerable (no duplicates).;To;;0;[o;;[I"{&}[#method-i-26] (aliased as #intersection) -
Returns a new set containing all elements common to +self+
and a given enumerable.;To;;0;[o;;[I"}{-}[#method-i-2D] (aliased as #difference) -
Returns a copy of +self+ with all elements
in a given enumerable removed.;To;;0;[o;;[I"{\^}[#method-i-5E] -
Returns a new set containing all elements from +self+
and a given enumerable except those common to both.;TS;;i;I"Methods for Comparing;To;;
;;[o;;0;[o;;[I"x{<=>}[#method-i-3C-3D-3E] -
Returns -1, 0, or 1 as +self+ is less than, equal to,
or greater than a given object.;To;;0;[o;;[I"u{==}[#method-i-3D-3D] -
Returns whether +self+ and a given enumerable are equal,
as determined by Object#eql?.;To;;0;[o;;[I"g#compare_by_identity? -
Returns whether the set considers only identity
when comparing elements.;TS;;i;I"Methods for Querying;To;;
;;[o;;0;[o;;[I"A#length (aliased as #size) -
Returns the count of elements.;To;;0;[o;;[I"8#empty? -
Returns whether the set has no elements.;To;;0;[o;;[I"i#include? (aliased as #member? and #===) -
Returns whether a given object is an element in the set.;To;;0;[o;;[I"j#subset? (aliased as {<=}[#method-i-3C-3D]) -
Returns whether a given object is a subset of the set.;To;;0;[o;;[I"x#proper_subset? (aliased as {<}[#method-i-3C]) -
Returns whether a given enumerable is a proper subset of the set.;To;;0;[o;;[I"s#superset? (aliased as {<=}[#method-i-3E-3D]]) -
Returns whether a given enumerable is a superset of the set.;To;;0;[o;;[I"|#proper_superset? (aliased as {>}[#method-i-3E]) -
Returns whether a given enumerable is a proper superset of the set.;To;;0;[o;;[I"p#disjoint? -
Returns +true+ if the set and a given enumerable
have no common elements, +false+ otherwise.;To;;0;[o;;[I"t#intersect? -
Returns +true+ if the set and a given enumerable -
have any common elements, +false+ otherwise.;To;;0;[o;;[I"g#compare_by_identity? -
Returns whether the set considers only identity
when comparing elements.;TS;;i;I"Methods for Assigning;To;;
;;[ o;;0;[o;;[I"M#add (aliased as #<<) -
Adds a given object to the set; returns +self+.;To;;0;[o;;[I"v#add? -
If the given object is not an element in the set,
adds it and returns +self+; otherwise, returns +nil+.;To;;0;[o;;[I"A#merge -
Adds each given object to the set; returns +self+.;To;;0;[o;;[I"[#replace -
Replaces the contents of the set with the contents
of a given enumerable.;TS;;i;I"Methods for Deleting;To;;
;;[
o;;0;[o;;[I"?#clear -
Removes all elements in the set; returns +self+.;To;;0;[o;;[I"D#delete -
Removes a given object from the set; returns +self+.;To;;0;[o;;[I"x#delete? -
If the given object is an element in the set,
removes it and returns +self+; otherwise, returns +nil+.;To;;0;[o;;[I"I#subtract -
Removes each given object from the set; returns +self+.;To;;0;[o;;[I">#delete_if - Removes elements specified by a given block.;To;;0;[o;;[I"W#select! (aliased as #filter!) -
Removes elements not specified by a given block.;To;;0;[o;;[I"A#keep_if -
Removes elements not specified by a given block.;To;;0;[o;;[I";#reject!
Removes elements specified by a given block.;TS;;i;I"Methods for Converting;To;;
;;[
o;;0;[o;;[I"a#classify -
Returns a hash that classifies the elements,
as determined by the given block.;To;;0;[o;;[I"U#collect! (aliased as #map!) -
Replaces each element with a block return-value.;To;;0;[o;;[I"#divide -
Returns a hash that classifies the elements,
as determined by the given block;
differs from #classify in that the block may accept
either one or two arguments.;To;;0;[o;;[I"#flatten -
Returns a new set that is a recursive flattening of +self+.
#flatten! -
Replaces each nested set in +self+ with the elements from that set.;To;;0;[o;;[I"M#inspect (aliased as #to_s) -
Returns a string displaying the elements.;To;;0;[o;;[I"}#join -
Returns a string containing all elements, converted to strings
as needed, and joined by the given record separator.;To;;0;[o;;[I";#to_a -
Returns an array containing all set elements.;To;;0;[o;;[I"#to_set -
Returns +self+ if given no arguments and no block;
with a block given, returns a new set consisting of block
return values.;TS;;i;I"Methods for Iterating;To;;
;;[o;;0;[o;;[I"K#each -
Calls the block with each successive element; returns +self+.;TS;;i;I"Other Methods;To;;
;;[o;;0;[o;;[I"m#reset -
Resets the internal state; useful if an object
has been modified while an element in the set.;T; I"lib/set.rb;T;
0; 0;
0[ [ [[I"Enumerable;To;;[ ; @u;
0I"lib/set.rb;T[[I"
class;T[[:public[ [:protected[ [:private[[I"[];T@}[I"json_create;TI"!ext/json/lib/json/add/set.rb;T[I"new;T@}[I"
instance;T[[;[ [;[ [;[@[I"&;T@}[I"+;T@}[I"-;T@}[I"<;T@}[I"<<;T@}[I"<=;T@}[I"<=>;T@}[I"==;T@}[I"===;T@}[I">;T@}[I">=;T@}[I"^;T@}[I"add;T@}[I" add?;T@}[I"as_json;T@[I"
classify;T@}[I"
clear;T@}[I"
collect!;T@}[I"compare_by_identity;T@}[I"compare_by_identity?;T@}[I"delete;T@}[I"delete?;T@}[I"delete_if;T@}[I"difference;T@}[I"disjoint?;T@}[I"divide;T@}[I" each;T@}[I"empty?;T@}[I"filter!;T@}[I"flatten;T@}[I"
flatten!;T@}[I"
include?;T@}[I"initialize_clone;T@}[I"initialize_dup;T@}[I"inspect;T@}[I"intersect?;T@}[I"intersection;T@}[I" join;T@}[I"keep_if;T@}[I"length;T@}[I" map!;T@}[I"member?;T@}[I"
merge;T@}[I"proper_subset?;T@}[I"proper_superset?;T@}[I"reject!;T@}[I"replace;T@}[I"
reset;T@}[I"select!;T@}[I" size;T@}[I"subset?;T@}[I"
subtract;T@}[I"superset?;T@}[I" to_a;T@}[I"to_json;T@[I" to_s;T@}[I"to_set;T@}[I"
union;T@}[I"|;T@}[ [U:RDoc::Context::Section[i 0o;;[ ; 0;
0[I"!ext/json/lib/json/add/set.rb;TI"lib/set.rb;T@ucRDoc::TopLevelPK kq]n map%21-i.rinu [ U:RDoc::AnyMethod[iI" map!:ETI"
Set#map!;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass0[@FI"
collect!;TPK kq]P0D difference-i.rinu [ U:RDoc::AnyMethod[iI"difference:ETI"Set#difference;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass0[@FI"-;TPK kq]QH*K K replace-i.rinu [ U:RDoc::AnyMethod[iI"replace:ETI"Set#replace;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"hReplaces the contents of the set with the contents of the given
enumerable object and returns self.;To:RDoc::Markup::Verbatim; [I"@set = Set[1, 'c', :s] #=> #
;TI":set.replace([1, 2]) #=> #
;TI":set #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]N% inspect-i.rinu [ U:RDoc::AnyMethod[iI"inspect:ETI"Set#inspect;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"rReturns a string containing a human-readable representation of the
set ("#").;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I" to_s;To;; [ ;@;0I"();T@FI"Set;TcRDoc::NormalClass00PK kq]kT
clear-i.rinu [ U:RDoc::AnyMethod[iI"
clear:ETI"Set#clear;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Removes all elements and returns self.;To:RDoc::Markup::Verbatim; [I"@set = Set[1, 'c', :s] #=> #
;TI"6set.clear #=> #
;TI"6set #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]ٗT json_create-c.rinu [ U:RDoc::AnyMethod[iI"json_create:ETI"Set::json_create;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"%Import a JSON Marshalled object.;To:RDoc::Markup::BlankLine o;
; [I".method used for JSON marshalling support.;T:
@fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(object);T@FI"Set;TcRDoc::NormalClass00PK kq] 4$; to_a-i.rinu [ U:RDoc::AnyMethod[iI" to_a:ETI"
Set#to_a;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"FConverts the set to an array. The order of elements is uncertain.;To:RDoc::Markup::Verbatim; [I"2Set[1, 2].to_a #=> [1, 2]
;TI"8Set[1, 'c', :s].to_a #=> [1, "c", :s]
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]Q Q
merge-i.rinu [ U:RDoc::AnyMethod[iI"
merge:ETI"Set#merge;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"TMerges the elements of the given enumerable object to the set and
returns self.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]
ͻ %5b%5d-c.rinu [ U:RDoc::AnyMethod[iI"[]:ETI"Set::[];TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"4Creates a new set containing the given objects.;To:RDoc::Markup::Verbatim; [I"5Set[1, 2] # => #
;TI"5Set[1, 2, 1] # => #
;TI";Set[1, 'c', :s] # => #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*ary);T@FI"Set;TcRDoc::NormalClass00PK kq]e compare_by_identity-i.rinu [ U:RDoc::AnyMethod[iI"compare_by_identity:ETI"Set#compare_by_identity;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Makes the set compare its elements by their identity and returns
self. This method may not be supported by all subclasses of Set.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq](s keep_if-i.rinu [ U:RDoc::AnyMethod[iI"keep_if:ETI"Set#keep_if;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Deletes every element of the set for which block evaluates to
false, and returns self. Returns an enumerator if no block is
given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]3dh, , new-c.rinu [ U:RDoc::AnyMethod[iI"new:ETI"
Set::new;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"NCreates a new set containing the elements of the given enumerable
object.;To;
; [I"SIf a block is given, the elements of enum are preprocessed by the
given block.;To:RDoc::Markup::Verbatim; [
I">Set.new([1, 2]) #=> #
;TI">Set.new([1, 2, 1]) #=> #
;TI"DSet.new([1, 'c', :s]) #=> #
;TI"GSet.new(1..5) #=> #
;TI"ASet.new([1, 2, 3]) { |x| x * x } #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[ I"(enum = nil);T@FI"Set;TcRDoc::NormalClass00PK kq],y y reject%21-i.rinu [ U:RDoc::AnyMethod[iI"reject!:ETI"Set#reject!;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"vEquivalent to Set#delete_if, but returns nil if no changes were
made. Returns an enumerator if no block is given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(&block);T@FI"Set;TcRDoc::NormalClass00PK kq]:Xa- -
empty%3f-i.rinu [ U:RDoc::AnyMethod[iI"empty?:ETI"Set#empty?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"2Returns true if the set contains no elements.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]ۉvF F add%3f-i.rinu [ U:RDoc::AnyMethod[iI" add?:ETI"
Set#add?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"iAdds the given object to the set and returns self. If the
object is already in the set, returns nil.;To:RDoc::Markup::Verbatim; [I"@Set[1, 2].add?(3) #=> #
;TI"ESet[1, 2].add?([3, 4]) #=> #
;TI"2Set[1, 2].add?(2) #=> nil
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@FI"Set;TcRDoc::NormalClass00PK kq]*0& & %26-i.rinu [ U:RDoc::AnyMethod[iI"&:ETI"
Set#&;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"]Returns a new set containing elements common to the set and the
given enumerable object.;To:RDoc::Markup::Verbatim; [I"@Set[1, 3, 5] & Set[3, 2, 1] #=> #
;TI"DSet['a', 'b', 'z'] & ['a', 'b', 'c'] #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"intersection;To;; [ ;
@;0I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]\ compare_by_identity%3f-i.rinu [ U:RDoc::AnyMethod[iI"compare_by_identity?:ETI"Set#compare_by_identity?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"kReturns true if the set will compare its elements by their
identity. Also see Set#compare_by_identity.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]>(DZ Z flatten-i.rinu [ U:RDoc::AnyMethod[iI"flatten:ETI"Set#flatten;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"]Returns a new set that is a copy of the set, flattening each
containing set recursively.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]VPh include%3f-i.rinu [ U:RDoc::AnyMethod[iI"
include?:ETI"Set#include?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"7Returns true if the set contains the given object.;To;
; [I"Note that include? and member? do not test member
equality using == as do other Enumerables.;To;
; [I"!See also Enumerable#include?;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"member?;To;; [ ;@;0[I"===;To;; [
o;
; [I"RReturns true if the given object is a member of the set,
and false otherwise.;To;
; [I"Used in case statements:;To:RDoc::Markup::Verbatim; [I"require 'set'
;TI"
;TI"case :apple
;TI" when Set[:potato, :carrot]
;TI" "vegetable"
;TI"when Set[:apple, :banana]
;TI" "fruit"
;TI" end
;TI"# => "fruit"
;T:@format0o;
; [I"Or by itself:;To;
; [I"#Set[1, 2, 3] === 2 #=> true
;TI"$Set[1, 2, 3] === 4 #=> false
;T;0;@;0I"(o);T@FI"Set;TcRDoc::NormalClass00PK kq]2f& & initialize_dup-i.rinu [ U:RDoc::AnyMethod[iI"initialize_dup:ETI"Set#initialize_dup;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Dup internal hash.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(orig);T@TI"Set;TcRDoc::NormalClass00PK kq] _ %3c%3d-i.rinu [ U:RDoc::AnyMethod[iI"<=:ETI"Set#<=;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass0[@FI"subset?;TPK kq]A% collect%21-i.rinu [ U:RDoc::AnyMethod[iI"
collect!:ETI"Set#collect!;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"tReplaces the elements with ones returned by collect().
Returns an enumerator if no block is given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[[I" map!;To;; [ ;@;0I"();T@FI"Set;TcRDoc::NormalClass00PK kq]0`3 3 filter%21-i.rinu [ U:RDoc::AnyMethod[iI"filter!:ETI"Set#filter!;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Equivalent to Set#select!;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(&block);T@FI"Set;TcRDoc::NormalClass0[@FI"select!;TPK kq]R. intersection-i.rinu [ U:RDoc::AnyMethod[iI"intersection:ETI"Set#intersection;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass0[@FI"&;TPK kq]weh h join-i.rinu [ U:RDoc::AnyMethod[iI" join:ETI"
Set#join;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"dReturns a string created by converting each element of the set to a string
See also: Array#join;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(separator=nil);T@FI"Set;TcRDoc::NormalClass00PK kq]?j3 %3e%3d-i.rinu [ U:RDoc::AnyMethod[iI">=:ETI"Set#>=;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass0[@FI"superset?;TPK kq])9 9 size-i.rinu [ U:RDoc::AnyMethod[iI" size:ETI"
Set#size;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"$Returns the number of elements.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"length;To;; [ ;@;0I"();T@FI"Set;TcRDoc::NormalClass00PK kq]FQi %3e-i.rinu [ U:RDoc::AnyMethod[iI">:ETI"
Set#>;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass0[@FI"proper_superset?;TPK kq]O~3 disjoint%3f-i.rinu [ U:RDoc::AnyMethod[iI"disjoint?:ETI"Set#disjoint?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Returns true if the set and the given enumerable have
no element in common. This method is the opposite of intersect?.;To:RDoc::Markup::Verbatim; [ I"2Set[1, 2, 3].disjoint? Set[3, 4] #=> false
;TI"1Set[1, 2, 3].disjoint? Set[4, 5] #=> true
;TI"2Set[1, 2, 3].disjoint? [3, 4] #=> false
;TI"1Set[1, 2, 3].disjoint? 4..5 #=> true
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]K*{ as_json-i.rinu [ U:RDoc::AnyMethod[iI"as_json:ETI"Set#as_json;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I" Marshal the object to JSON.;To:RDoc::Markup::BlankLine o;
; [I".method used for JSON marshalling support.;T:
@fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*);T@FI"Set;TcRDoc::NormalClass00PK kq]2:
. . to_json-i.rinu [ U:RDoc::AnyMethod[iI"to_json:ETI"Set#to_json;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"return the JSON value;T:
@fileI"!ext/json/lib/json/add/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*args);T@FI"Set;TcRDoc::NormalClass00PK kq]JH" to_s-i.rinu [ U:RDoc::AnyMethod[iI" to_s:ETI"
Set#to_s;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass0[@FI"inspect;TPK kq]o0p p delete-i.rinu [ U:RDoc::AnyMethod[iI"delete:ETI"Set#delete;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"tDeletes the given object from the set and returns self. Use
subtract to delete many items at once.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@FI"Set;TcRDoc::NormalClass00PK kq]aDh:e e %5e-i.rinu [ U:RDoc::AnyMethod[iI"^:ETI"
Set#^;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Returns a new set containing elements exclusive between the set
and the given enumerable object. (set ^ enum) is equivalent to
((set | enum) - (set & enum)).;To:RDoc::Markup::Verbatim; [I"@Set[1, 2] ^ Set[2, 3] #=> #
;TI"GSet[1, 'b', 'c'] ^ ['b', 'd'] #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]\ T T subset%3f-i.rinu [ U:RDoc::AnyMethod[iI"subset?:ETI"Set#subset?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I":Returns true if the set is a subset of the given set.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<=;To;; [ ;@;0I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]ϡZ Z intersect%3f-i.rinu [ U:RDoc::AnyMethod[iI"intersect?:ETI"Set#intersect?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"ZReturns true if the set and the given enumerable have at least one
element in common.;To:RDoc::Markup::Verbatim; [ I"3Set[1, 2, 3].intersect? Set[4, 5] #=> false
;TI"2Set[1, 2, 3].intersect? Set[3, 4] #=> true
;TI"3Set[1, 2, 3].intersect? 4..5 #=> false
;TI"2Set[1, 2, 3].intersect? [3, 4] #=> true
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]M$Z Z superset%3f-i.rinu [ U:RDoc::AnyMethod[iI"superset?:ETI"Set#superset?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"=;To;; [ ;@;0I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]*ϲ delete_if-i.rinu [ U:RDoc::AnyMethod[iI"delete_if:ETI"Set#delete_if;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Deletes every element of the set for which block evaluates to
true, and returns self. Returns an enumerator if no block is
given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]ki i add-i.rinu [ U:RDoc::AnyMethod[iI"add:ETI"Set#add;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"lAdds the given object to the set and returns self. Use merge to
add many elements at once.;To:RDoc::Markup::Verbatim; [I"?Set[1, 2].add(3) #=> #
;TI"DSet[1, 2].add([3, 4]) #=> #
;TI" #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"<<;To;; [ ;
@;0I"(o);T@FI"Set;TcRDoc::NormalClass00PK kq]l %3c-i.rinu [ U:RDoc::AnyMethod[iI"<:ETI"
Set#<;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass0[@FI"proper_subset?;TPK kq]
#MI I %7c-i.rinu [ U:RDoc::AnyMethod[iI"|:ETI"
Set#|;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"`Returns a new set built by merging the set and the elements of the
given enumerable object.;To:RDoc::Markup::Verbatim; [I"ESet[1, 2, 3] | Set[2, 4, 5] #=> #
;TI"MSet[1, 5, 'z'] | (1..6) #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"+;To;; [ ;
@;0[I"
union;To;; [ ;
@;0I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]Vh h delete%3f-i.rinu [ U:RDoc::AnyMethod[iI"delete?:ETI"Set#delete?;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"jDeletes the given object from the set and returns self. If the
object is not in the set, returns nil.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@FI"Set;TcRDoc::NormalClass00PK kq]wF[ [
subtract-i.rinu [ U:RDoc::AnyMethod[iI"
subtract:ETI"Set#subtract;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"XDeletes every element that appears in the given enumerable object
and returns self.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq]̜} } flatten%21-i.rinu [ U:RDoc::AnyMethod[iI"
flatten!:ETI"Set#flatten!;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"~Equivalent to Set#flatten, but replaces the receiver with the
result in place. Returns nil if no modifications were made.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]{q select%21-i.rinu [ U:RDoc::AnyMethod[iI"select!:ETI"Set#select!;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"tEquivalent to Set#keep_if, but returns nil if no changes were
made. Returns an enumerator if no block is given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"filter!;To;; [o;
; [I"Equivalent to Set#select!;T;@;0I"
(&block);T@FI"Set;TcRDoc::NormalClass00PK kq]?< divide-i.rinu [ U:RDoc::AnyMethod[iI"divide:ETI"Set#divide;TF:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"cDivides the set into a set of subsets according to the commonality
defined by the given block.;To;
; [I"If the arity of the block is 2, elements o1 and o2 are in common
if block.call(o1, o2) is true. Otherwise, elements o1 and o2 are
in common if block.call(o1) == block.call(o2).;To:RDoc::Markup::Verbatim; [I"require 'set'
;TI"*numbers = Set[1, 3, 4, 6, 9, 10, 11]
;TI"5set = numbers.divide { |i,j| (i - j).abs == 1 }
;TI")set #=> #,
;TI"1 # #,
;TI", # #,
;TI"* # #}>
;T:@format0o;
; [I"0Returns an enumerator if no block is given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(&func);T@FI"Set;TcRDoc::NormalClass00PK kq];˻
union-i.rinu [ U:RDoc::AnyMethod[iI"
union:ETI"Set#union;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass0[@FI"|;TPK kq]l member%3f-i.rinu [ U:RDoc::AnyMethod[iI"member?:ETI"Set#member?;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@FI"Set;TcRDoc::NormalClass0[@FI"
include?;TPK kq]SV %3d%3d%3d-i.rinu [ U:RDoc::AnyMethod[iI"===:ETI"Set#===;TF:privateo:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph; [I"RReturns true if the given object is a member of the set,
and false otherwise.;To;
; [I"Used in case statements:;To:RDoc::Markup::Verbatim; [I"require 'set'
;TI"
;TI"case :apple
;TI" when Set[:potato, :carrot]
;TI" "vegetable"
;TI"when Set[:apple, :banana]
;TI" "fruit"
;TI" end
;TI"# => "fruit"
;T:@format0o;
; [I"Or by itself:;To;; [I"#Set[1, 2, 3] === 2 #=> true
;TI"$Set[1, 2, 3] === 4 #=> false
;T;0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@#FI"Set;TcRDoc::NormalClass0[@&FI"
include?;TPK kq]kC %2b-i.rinu [ U:RDoc::AnyMethod[iI"+:ETI"
Set#+;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(enum);T@FI"Set;TcRDoc::NormalClass0[@FI"|;TPK kq]- each-i.rinu [ U:RDoc::AnyMethod[iI" each:ETI"
Set#each;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Calls the given block once for each element in the set, passing
the element as parameter. Returns an enumerator if no block is
given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(&block);T@FI"Set;TcRDoc::NormalClass00PK kq]T to_set-i.rinu [ U:RDoc::AnyMethod[iI"to_set:ETI"Set#to_set;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Returns self if no arguments are given. Otherwise, converts the
set to another with klass.new(self, *args, &block).;To;
; [I"ZIn subclasses, returns klass.new(self, *args, &block) unless
overridden.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"!(klass = Set, *args, &block);T@FI"Set;TcRDoc::NormalClass00PK kq]*< < %2d-i.rinu [ U:RDoc::AnyMethod[iI"-:ETI"
Set#-;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"xReturns a new set built by duplicating the set, removing every
element that appears in the given enumerable object.;To:RDoc::Markup::Verbatim; [I"=Set[1, 3, 5] - Set[1, 5] #=> #
;TI"DSet['a', 'b', 'z'] - ['a', 'c'] #=> #
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[[I"difference;To;; [ ;
@;0I"(enum);T@FI"Set;TcRDoc::NormalClass00PK kq][W %3c%3c-i.rinu [ U:RDoc::AnyMethod[iI"<<:ETI"Set#<<;TF:privateo:RDoc::Markup::Document:@parts[ :
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(o);T@FI"Set;TcRDoc::NormalClass0[@FI"add;TPK kq]AR R
classify-i.rinu [ U:RDoc::AnyMethod[iI"
classify:ETI"Set#classify;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Classifies the set by the return value of the given block and
returns a hash of {value => set of elements} pairs. The block is
called once for each element of the set, passing the element as
parameter.;To:RDoc::Markup::Verbatim; [I"require 'set'
;TI"'files = Set.new(Dir.glob("*.rb"))
;TI"6hash = files.classify { |f| File.mtime(f).year }
;TI"5hash #=> {2000=>#,
;TI"= # 2001=>#,
;TI"- # 2002=>#}
;T:@format0o;
; [I"0Returns an enumerator if no block is given.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below00I"o;T[ I"();T@FI"Set;TcRDoc::NormalClass00PK kq]&K %3d%3d-i.rinu [ U:RDoc::AnyMethod[iI"==:ETI"Set#==;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"uReturns true if two sets are equal. The equality of each couple
of elements is defined according to Object#eql?.;To:RDoc::Markup::Verbatim; [ I";Set[1, 2] == Set[2, 1] #=> true
;TI" false
;TI";Set['a', 'b', 'c'] == Set['a', 'c', 'b'] #=> true
;TI" false
;T:@format0:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(other);T@FI"Set;TcRDoc::NormalClass00PK kq]3 %3c%3d%3e-i.rinu [ U:RDoc::AnyMethod[iI"<=>:ETI"Set#<=>;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Returns 0 if the set are equal,
-1 / +1 if the set is a proper subset / superset of the given set,
or nil if they both have unique elements.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"
(set);T@FI"Set;TcRDoc::NormalClass00PK kq]v%7 7 initialize_clone-i.rinu [ U:RDoc::AnyMethod[iI"initialize_clone:ETI"Set#initialize_clone;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Clone internal hash.;T:
@fileI"lib/set.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(orig, **options);T@TI"Set;TcRDoc::NormalClass00PK kq]i length-i.rinu [ PK kq]Ӈun n $ proper_superset%3f-i.rinu [ PK kq]I&h h proper_subset%3f-i.rinu [ PK kq]pȞ
reset-i.rinu [ PK kq]$M+ M+ L cdesc-Set.rinu [ PK kq]n 1 map%21-i.rinu [ PK kq]P0D 2 difference-i.rinu [ PK kq]QH*K K *4 replace-i.rinu [ PK kq]N% 6 inspect-i.rinu [ PK kq]kT
x8 clear-i.rinu [ PK kq]ٗT : json_create-c.rinu [ PK kq] 4$; <