Class: Enumerable::MultiSender
Instance Method Summary collapse
-
#initialize(enumerable, method) ⇒ MultiSender
constructor
A new instance of MultiSender.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(enumerable, method) ⇒ MultiSender
Returns a new instance of MultiSender.
43 44 45 46 |
# File 'lib/hobosupport/enumerable.rb', line 43 def initialize(enumerable, method) @enumerable = enumerable @method = method end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
48 49 50 |
# File 'lib/hobosupport/enumerable.rb', line 48 def method_missing(name, *args, &block) @enumerable.send(@method) { |x| x.send(name, *args, &block) } end |