Sha256: f79b644c77ff45fe0f6ab7b32d42bf07595e3242b21485c4b4ab156c47c4132e

Contents?: true

Size: 388 Bytes

Versions: 12

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

class ImageOptim
  # Denote range of non negative integers for worker option
  class NonNegativeIntegerRange
    # Add handling of range of non negative integers in OptionParser instance
    def self.add_to_option_parser(option_parser)
      option_parser.accept(self, /(\d+)(?:-|\.\.)(\d+)/) do |_, m, n|
        m.to_i..n.to_i
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
image_optim-0.31.4 lib/image_optim/non_negative_integer_range.rb
image_optim-0.31.3 lib/image_optim/non_negative_integer_range.rb
image_optim-0.31.2 lib/image_optim/non_negative_integer_range.rb
image_optim-0.31.1 lib/image_optim/non_negative_integer_range.rb
image_optim-0.31.0 lib/image_optim/non_negative_integer_range.rb
image_optim-0.30.0 lib/image_optim/non_negative_integer_range.rb
image_optim-0.29.0 lib/image_optim/non_negative_integer_range.rb
image_optim-0.28.0 lib/image_optim/non_negative_integer_range.rb
image_optim-0.27.1 lib/image_optim/non_negative_integer_range.rb
image_optim-0.27.0 lib/image_optim/non_negative_integer_range.rb
image_optim-0.26.5 lib/image_optim/non_negative_integer_range.rb
image_optim-0.26.4 lib/image_optim/non_negative_integer_range.rb