Module: Gemmy::Patches::ArrayPatch::InstanceMethods::MethodMissing

Defined in:
lib/gemmy/patches/array_patch.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(fn, &blk) ⇒ Object

Tries to forward methods to enumerator



48
49
50
51
52
53
54
55
# File 'lib/gemmy/patches/array_patch.rb', line 48

def method_missing(fn, &blk)
  enum = to_enum
  if enum.respond_to?(fn)
    blk ? enum.send(fn, &blk) : enum.send(fn)
  else
    super
  end
end