Class: Enumerable::EveryProxy

Inherits:
BasicObject
Defined in:
lib/ruby_ext/core/enumerable.rb

Instance Method Summary collapse

Constructor Details

#initialize(enumerable) ⇒ EveryProxy

Returns a new instance of EveryProxy.



3
4
5
# File 'lib/ruby_ext/core/enumerable.rb', line 3

def initialize enumerable
  @enumerable = enumerable
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object (protected)



8
9
10
11
# File 'lib/ruby_ext/core/enumerable.rb', line 8

def method_missing m, *a, &b
  @enumerable.each{|o| o.send m, *a, &b}
  self
end