lib/dna_hamming/hamming.rb in dna_hamming-0.1.0 vs lib/dna_hamming/hamming.rb in dna_hamming-0.1.1
- old
+ new
@@ -2,10 +2,10 @@
def self.compute(pair)
set_strand_position_by_length(pair) unless pair.same?
count_the_distance(pair)
end
- private
+ module_function
def self.count_the_distance(pair)
pair.entries.map(&:chars).inject(:zip).select{|a,b| a!=b}.count
end
def self.set_strand_position_by_length(pair)