Sha256: 720f39034b39550c4958a7f55f37a2864fde42a8a0832fcded42c1bb136860ba

Contents?: true

Size: 289 Bytes

Versions: 1

Compression:

Stored size: 289 Bytes

Contents

module Enumerable
  def with_roman_index(offset = 1)
    return to_enum(:with_roman_index, offset) unless block_given?
    each do |o|
      val = yield(o, Roman(offset))
      offset += 1
      val
    end
  end

  def each_with_roman_index(&block)
    with_roman_index(&block)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
romaniac-0.0.1 lib/romaniac/ext/enumerable.rb