Sha256: 0826bea5b54958607d87861d208279153e7e10a49eacb9d36129ed518055af1c

Contents?: true

Size: 402 Bytes

Versions: 2

Compression:

Stored size: 402 Bytes

Contents

module MovingAverage

  module Errors

    class InvalidIndexError < IndexError
      def message
        'Given idx is outside the Array.'
      end
    end

    class InvalidTailError < RangeError
      def message
        'Given tail is <= 0.'
      end
    end

    class NotEnoughDataError < ArgumentError
      def message
        'Given tail is too large for idx.'
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moving_average-0.0.3 lib/moving_average/errors.rb
moving_average-0.0.2 lib/moving_average/errors.rb