Module: Enumerable
- Defined in:
- lib/tagen/core/enumerable.rb
Instance Method Summary collapse
-
#grep_values(*patterns, &blk) ⇒ Array
Returns an array of every element in enum for each pattern === element.
Instance Method Details
#grep_values(*patterns, &blk) ⇒ Array
Returns an array of every element in enum for each pattern === element
10 11 12 13 14 |
# File 'lib/tagen/core/enumerable.rb', line 10 def grep_values(*patterns, &blk) patterns.each.with_object([]) {|pat,m| m.push *grep(pat, &blk) } end |