Module: Numbers
Instance Method Summary collapse
Instance Method Details
#from(n, increment = 1) ⇒ Object
4 5 6 |
# File 'lib/abstractivator/numbers.rb', line 4 def from(n, increment=1) Enumerator.unfold(n) { |nxt| [nxt, nxt + increment] } end |