Module: Enumerable

Defined in:
lib/merb-cache/core_ext/enumerable.rb

Instance Method Summary collapse

Instance Method Details

#capture_firstObject


2
3
4
5
6
7
8
# File 'lib/merb-cache/core_ext/enumerable.rb', line 2

def capture_first
  each do |o|
    return yield(o) || next
  end

  nil
end