Sha256: c3907a45b654173427c9cc7cff4867833ae3171b4253fa7c3384113c63a1ee0e
Contents?: true
Size: 282 Bytes
Versions: 1
Compression:
Stored size: 282 Bytes
Contents
# frozen_string_literal: true require 'circle_array/version' module Circle class Error < StandardError; end class Array < ::Array def [](index) result = super return result if result return nil if size.zero? self[index - size] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
circle_array-0.1.0 | lib/circle_array.rb |