Class: Array
Instance Method Summary
collapse
#<
#<=
#===, #old_triple_equal4Set
#to_set
#**
#^
Instance Method Details
#&(item) ⇒ Object
654
655
656
657
658
659
|
# File 'lib/setfu.rb', line 654
def &(item)
return old_and_method4set(item) if (item.class==Array)
a = Set.new(self)
b = Set.new(item)
return a & b
end
|
#-(item) ⇒ Object
648
649
650
651
652
653
|
# File 'lib/setfu.rb', line 648
def -(item)
return old_subtract_method4set(item) if (item.class==Array)
a = Set.new(self)
b = Set.new(item)
return a - b
end
|
#old_and_method4set ⇒ Object
638
|
# File 'lib/setfu.rb', line 638
alias_method :old_and_method4set, :&
|
#old_or_method4set ⇒ Object
639
|
# File 'lib/setfu.rb', line 639
alias_method :old_or_method4set, :|
|
#old_subtract_method4set ⇒ Object
637
|
# File 'lib/setfu.rb', line 637
alias_method :old_subtract_method4set, :-
|
#|(item) ⇒ Object
660
661
662
663
664
665
|
# File 'lib/setfu.rb', line 660
def |(item)
return old_or_method4set(item) if (item.class==Array)
a = Set.new(self)
b = Set.new(item)
return a | b
end
|