Sha256: ddc1ab6f90d27ea30ee4d2260bb15dedc655ea041c6b8fc38e01dff10116c811
Contents?: true
Size: 309 Bytes
Versions: 340
Compression:
Stored size: 309 Bytes
Contents
class Series def initialize(series) @series = (series) end def slices(n) if n > @series.length raise ArgumentError end series = @series substrings = [] until series.length < n substrings << series[0..n-1] series = series[1..-1] end substrings end end
Version data entries
340 entries across 340 versions & 1 rubygems