Module: Doing::EnumeratorWrapper
- Included in:
- FluentEnumerator
- Defined in:
- lib/doing/enumerator_wrapper.rb
Instance Method Summary collapse
Instance Method Details
#wrap(*method_names) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/doing/enumerator_wrapper.rb', line 3 def wrap(*method_names) method_names.each do |method_name| define_method(method_name.to_s) do |*args, &block| self.class.new(enumerator.send(method_name, *args, &block)) end end end |