Sha256: 67a84ebbe791c6cd88cfc1b41c2f6afce0ff1065207bebe3bdcc3b712f9b03b7

Contents?: true

Size: 774 Bytes

Versions: 11

Compression:

Stored size: 774 Bytes

Contents

# frozen_string_literal: true

module MaxAmount
  class Error < StandardError
  end

  class InputDataEmpty < Error
    def message
      'The string cannot be empty'
    end
  end

  class CountNumbersMustBePositive < Error
    def message
      'The entered number must be positive'
    end
  end

  class CountNumbersNotEqualZero < Error
    def message
      'The entered number cannot equal to zero'
    end
  end

  class InputDataCountNumbersMustExist < Error
    def message
      'The string and number must exist'
    end
  end

  class NotContainZero < Error
    def message
      'Must have at least one number'
    end
  end

  class InvalidDigitInput < Error
    def message
      'The length of the number cannot exceed the specified value'
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
max_amount-1.4.2 lib/max_amount/errors.rb
max_amount-1.4.0 lib/max_amount/errors.rb
max_amount-1.3.9 lib/max_amount/errors.rb
max_amount-1.3.8 lib/max_amount/errors.rb
max_amount-1.3.7 lib/max_amount/errors.rb
max_amount-1.3.6 lib/max_amount/errors.rb
max_amount-1.3.5 lib/max_amount/errors.rb
max_amount-1.3.4 lib/max_amount/errors.rb
max_amount-1.2.4 lib/max_amount/errors.rb
max_amount-0.1.1 lib/max_amount/errors.rb
max_amount-0.1.0 lib/max_amount/errors.rb