Sha256: ea0e25427d2fa4a2a328c5505515b406c5cfbc8aa0882d1a4d0d234b1c7cea72

Contents?: true

Size: 330 Bytes

Versions: 7

Compression:

Stored size: 330 Bytes

Contents

require 'rubygems'
require 'thor'
require 'dna'
require 'set'
require 'progressbar'
require 'awesome_print'

Dir.glob(File.join(File.dirname(__FILE__), 'lederhosen', '*.rb')).each { |f| require f }

class String
  def to_kmers(k)
    return [] if k == 0
    k -= 1
    (0..(self.length-k-1)).collect { |i| self[i..i+k] }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lederhosen-0.1.6 lib/lederhosen.rb
lederhosen-0.1.5 lib/lederhosen.rb
lederhosen-0.1.4 lib/lederhosen.rb
lederhosen-0.1.3 lib/lederhosen.rb
lederhosen-0.1.2 lib/lederhosen.rb
lederhosen-0.1.1 lib/lederhosen.rb
lederhosen-0.1.0 lib/lederhosen.rb