Sha256: 92a9ac0d4c630ac2a8bf13e434e83dd44aba83d0200f6a97d5a623a4de946c24

Contents?: true

Size: 166 Bytes

Versions: 6

Compression:

Stored size: 166 Bytes

Contents

module Enumerable
	def first!(&block)
		matching = find(&block)
		if matching.nil?
			raise "Sequence contains no matching elements"
		else
			matching
		end
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
git_stats-1.0.17 lib/git_stats/core_extensions/enumerable.rb
git_stats-1.0.16 lib/git_stats/core_extensions/enumerable.rb
git_stats-1.0.15 lib/git_stats/core_extensions/enumerable.rb
git_stats-1.0.14 lib/git_stats/core_extensions/enumerable.rb
git_stats-1.0.13 lib/git_stats/core_extensions/enumerable.rb
git_stats-1.0.12 lib/git_stats/core_extensions/enumerable.rb