Sha256: 2464140e0cc17317814ce168c4af327f255585f4e165b4b77cfca174a7a00bfe
Contents?: true
Size: 303 Bytes
Versions: 17
Compression:
Stored size: 303 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
17 entries across 17 versions & 2 rubygems