Sha256: 0381b4b2319f1f0f763ec4ea9c060f726bfebf68a3eae0a5110b94725e32e082

Contents?: true

Size: 263 Bytes

Versions: 6

Compression:

Stored size: 263 Bytes

Contents

# frozen_string_literal: true

module Versionaire
  class Filler
    def initialize pad = 0, max: 2
      @pad = pad
      @max = max
    end

    def call array
      array.dup.fill pad, array.size..max
    end

    private

    attr_reader :pad, :max
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
versionaire-8.4.0 lib/versionaire/filler.rb
versionaire-8.3.0 lib/versionaire/filler.rb
versionaire-8.2.0 lib/versionaire/filler.rb
versionaire-8.1.0 lib/versionaire/filler.rb
versionaire-8.0.1 lib/versionaire/filler.rb
versionaire-8.0.0 lib/versionaire/filler.rb