Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/des.rb

Instance Method Summary collapse

Instance Method Details

#xor(another_ary) ⇒ Array

Parameters:

Returns:



15
16
17
# File 'lib/des.rb', line 15

def xor(another_ary)
  self.map.with_index { |obj, i| (obj ^ another_ary[i]) }
end