Sha256: a8d9896406075af7a3b6ca60da3eacd028808b17f6418285c686157aadf624ec

Contents?: true

Size: 295 Bytes

Versions: 14

Compression:

Stored size: 295 Bytes

Contents

module Enumerable
  class EveryProxy < BasicObject
    def initialize enumerable
      @enumerable = enumerable
    end

    protected
      def method_missing m, *a, &b
        @enumerable.each{|o| o.send m, *a, &b}
        self
      end
  end
  
  def every
    EveryProxy.new(self)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_ext-0.4.25 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.24 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.23 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.22 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.21 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.20 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.19 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.18 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.17 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.16 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.15 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.14 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.13 lib/ruby_ext/core/enumerable.rb
ruby_ext-0.4.12 lib/ruby_ext/core/enumerable.rb