Sha256: 7535293b58219fedd849c59e541b9ae38c2fbf4e81cf82b224ba14b2b85dd2f1
Contents?: true
Size: 541 Bytes
Versions: 2
Compression:
Stored size: 541 Bytes
Contents
A Range object represents an interval—a set of values with a beginning and an end. Ranges may be constructed using the s..e and s...e literals. Ranges constructed using .. run from the beginning to the end inclusively. Those created using ... exclude the end value. When used as an iterator, ranges return each value in the sequence. Range objects are used often in case statements, where the cover? Range method is used to determine is the case value is included in the range. Examples: array = (1...5).to_a array[0..-1] => [1, 2, 3, 4]
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubytutor-0.1.1 | lib/descriptions/Range.txt |
rubytutor-0.1.0 | lib/descriptions/Range.txt |