Method: GodObject::BitSet::BitSet#intersection
- Defined in:
- lib/god_object/bit_set/bit_set.rb
#intersection(other) ⇒ GodObject::BitSet Also known as: &
Returns a new BitSet with only those digits enabled which are enabled in both the current and other.
165 166 167 168 169 |
# File 'lib/god_object/bit_set/bit_set.rb', line 165 def intersection(other) other = other.to_i if other.respond_to?(:to_i) @configuration.new(@integer_representation & other) end |