PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Set
--- !ruby/object:RI::ClassDescription attributes: [] class_methods: - !ruby/object:RI::MethodSummary name: "[]" - !ruby/object:RI::MethodSummary name: new comment: - !ruby/struct:SM::Flow::P body: 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. - !ruby/struct:SM::Flow::P body: "Several methods accept any Enumerable object (implementing <tt>each</tt>) for greater flexibility: new, replace, merge, subtract, |, &, -, ^." - !ruby/struct:SM::Flow::P body: The equality of each couple of elements is determined according to Object#eql? and Object#hash, since Set uses Hash as storage. - !ruby/struct:SM::Flow::P body: Finally, if you are using class Set, you can also use Enumerable#to_set for convenience. - !ruby/struct:SM::Flow::H level: 2 text: Example - !ruby/struct:SM::Flow::VERB body: " require 'set'\n s1 = Set.new [1, 2] # -> #<Set: {1, 2}>\n s2 = [1, 2].to_set # -> #<Set: {1, 2}>\n s1 == s2 # -> true\n s1.add("foo") # -> #<Set: {1, 2, "foo"}>\n s1.merge([2, 6]) # -> #<Set: {6, 1, 2, "foo"}>\n s1.subset? s2 # -> false\n s2.subset? s1 # -> true\n" - !ruby/struct:SM::Flow::H level: 2 text: Contact - !ruby/struct:SM::Flow::VERB body: " - Akinori MUSHA <knu@iDaemons.org> (current maintainer)\n" constants: [] full_name: Set includes: - !ruby/object:RI::IncludedModule name: Enumerable instance_methods: - !ruby/object:RI::MethodSummary name: "&" - !ruby/object:RI::MethodSummary name: + - !ruby/object:RI::MethodSummary name: "-" - !ruby/object:RI::MethodSummary name: "<<" - !ruby/object:RI::MethodSummary name: == - !ruby/object:RI::MethodSummary name: ^ - !ruby/object:RI::MethodSummary name: add - !ruby/object:RI::MethodSummary name: add? - !ruby/object:RI::MethodSummary name: classify - !ruby/object:RI::MethodSummary name: clear - !ruby/object:RI::MethodSummary name: collect! - !ruby/object:RI::MethodSummary name: delete - !ruby/object:RI::MethodSummary name: delete? - !ruby/object:RI::MethodSummary name: delete_if - !ruby/object:RI::MethodSummary name: difference - !ruby/object:RI::MethodSummary name: divide - !ruby/object:RI::MethodSummary name: each - !ruby/object:RI::MethodSummary name: empty? - !ruby/object:RI::MethodSummary name: flatten - !ruby/object:RI::MethodSummary name: flatten! - !ruby/object:RI::MethodSummary name: flatten_merge - !ruby/object:RI::MethodSummary name: include? - !ruby/object:RI::MethodSummary name: initialize_copy - !ruby/object:RI::MethodSummary name: inspect - !ruby/object:RI::MethodSummary name: intersection - !ruby/object:RI::MethodSummary name: length - !ruby/object:RI::MethodSummary name: map! - !ruby/object:RI::MethodSummary name: member? - !ruby/object:RI::MethodSummary name: merge - !ruby/object:RI::MethodSummary name: proper_subset? - !ruby/object:RI::MethodSummary name: proper_superset? - !ruby/object:RI::MethodSummary name: reject! - !ruby/object:RI::MethodSummary name: replace - !ruby/object:RI::MethodSummary name: size - !ruby/object:RI::MethodSummary name: subset? - !ruby/object:RI::MethodSummary name: subtract - !ruby/object:RI::MethodSummary name: superset? - !ruby/object:RI::MethodSummary name: to_a - !ruby/object:RI::MethodSummary name: union - !ruby/object:RI::MethodSummary name: "|" name: Set superclass: Object
[-] size-i.yaml
[edit]
[-] collect%21-i.yaml
[edit]
[-] flatten%21-i.yaml
[edit]
[-] superset%3f-i.yaml
[edit]
[-] subset%3f-i.yaml
[edit]
[-] delete%3f-i.yaml
[edit]
[-] empty%3f-i.yaml
[edit]
[-] classify-i.yaml
[edit]
[-] proper_subset%3f-i.yaml
[edit]
[-] add%3f-i.yaml
[edit]
[-] difference-i.yaml
[edit]
[-] %2d-i.yaml
[edit]
[-] flatten-i.yaml
[edit]
[-] %3c%3c-i.yaml
[edit]
[-] include%3f-i.yaml
[edit]
[-] merge-i.yaml
[edit]
[-] add-i.yaml
[edit]
[-] initialize_copy-i.yaml
[edit]
[-] intersection-i.yaml
[edit]
[-] member%3f-i.yaml
[edit]
[-] %2b-i.yaml
[edit]
[-] inspect-i.yaml
[edit]
[-] union-i.yaml
[edit]
[-] delete-i.yaml
[edit]
[-] clear-i.yaml
[edit]
[-] reject%21-i.yaml
[edit]
[-] %3d%3d-i.yaml
[edit]
[-] proper_superset%3f-i.yaml
[edit]
[-] %5b%5d-c.yaml
[edit]
[-] %5e-i.yaml
[edit]
[-] to_a-i.yaml
[edit]
[-] map%21-i.yaml
[edit]
[-] subtract-i.yaml
[edit]
[-] length-i.yaml
[edit]
[+]
..
[-] cdesc-Set.yaml
[edit]
[-] delete_if-i.yaml
[edit]
[-] each-i.yaml
[edit]
[-] new-c.yaml
[edit]
[-] %26-i.yaml
[edit]
[-] %7c-i.yaml
[edit]
[-] divide-i.yaml
[edit]
[-] replace-i.yaml
[edit]
[-] flatten_merge-i.yaml
[edit]