Sha256: b806338486ea0bf6643769bb7ef09455fbda0122b5da1d51453e1e88ec4b0877
Contents?: true
Size: 635 Bytes
Versions: 3
Compression:
Stored size: 635 Bytes
Contents
# class Array # # list.xeach { it.foo } # def xeach &block # define_singleton_method(:it) { @_it } unless respond_to?(:it) # each do |_| # @_it = _ # instance_eval &block # end # end # # list.xmap { it * 2 } # def xmap &block # define_singleton_method(:it) { @_it } unless respond_to?(:it) # map do |_| # @_it = _ # instance_eval &block # end # end # # list.xselect { it.class != Module } # def xselect &block # define_singleton_method(:it) { @_it } unless respond_to?(:it) # select do |_| # @_it = _ # instance_eval &block # end # end # end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lux-fw-0.2.3 | ./lib/overload/it.rb |
lux-fw-0.2.1 | ./lib/overload/it.rb |
lux-fw-0.1.35 | ./lib/overload/it.rb |