Enumerator::ArithmeticSequence is a subclass of Enumerator, that is a representation of sequences of numbers with common difference. Instances of this class can be generated by the Range#step and Numeric#step methods.


Instance Methods


Returns true only if obj is an Enumerator::ArithmeticSequence, has equivalent begin, end, step, and exclude_end? settings.

An alias for ==
No documentation available
No documentation available
No documentation available
An alias for ==
No documentation available

Returns the first number in this arithmetic sequence, or an array of the first n elements.

Compute a hash-value for this arithmetic sequence. Two arithmetic sequences with same begin, end, step, and exclude_end? values will generate the same hash-value.

See also Object#hash.

Convert this arithmetic sequence to a printable form.

Returns the last number in this arithmetic sequence, or an array of the last n elements.

Returns the number of elements in this arithmetic sequence if it is a finite sequence. Otherwise, returns nil.

No documentation available