Module: Rubuild::Util
- Defined in:
- lib/rubuild/util.rb
Class Method Summary collapse
Class Method Details
.enumerable_find(enum, ifnone = nil) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/rubuild/util.rb', line 3 def self.enumerable_find(enum, ifnone=nil) rv = nil enum.find do |el| rv = yield el end rv || ifnone end |