Sha256: 84a32881c31b5a6c56781472ffdb2467db7884ab00adc381b8419f2c65384861
Contents?: true
Size: 304 Bytes
Versions: 10
Compression:
Stored size: 304 Bytes
Contents
class Integer # Like #times but returns a collection of the yield results. # # a = 3.of { |i| "#{i+1}" } # a #=> [ "1", "2", "3" ] # def of(&block) Array.new(self, &block) end # Time warn aliases for #of. alias_method :times_collect, :of alias_method :times_map, :of end
Version data entries
10 entries across 9 versions & 2 rubygems