Sha256: 9ab464d7235d1022e9026dbe13f549755d939a2b866250d3c69d30c5c96f3420

Contents?: true

Size: 461 Bytes

Versions: 6

Compression:

Stored size: 461 Bytes

Contents

# class Array
#   def it
#     @_it
#   end

#   # list.xeach { it.foo }
#   def xeach &block
#     each do |_|
#       @_it = _
#       instance_eval &block
#     end
#   end

#   # list.xmap { it * 2 }
#   def xmap &block
#     map do |_|
#       @_it = _
#       instance_eval &block
#     end
#   end

#   # list.xselect { it.class != Module }
#   def xselect &block
#     select do |_|
#       @_it = _
#       instance_eval &block
#     end
#   end
# end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./lib/overload/it.rb
lux-fw-0.5.36 ./lib/overload/it.rb
lux-fw-0.5.35 ./lib/overload/it.rb
lux-fw-0.5.34 ./lib/overload/it.rb
lux-fw-0.5.33 ./lib/overload/it.rb
lux-fw-0.5.32 ./lib/overload/it.rb