Module: Enumerable
- Defined in:
- lib/interpol/each_with_object.rb
Overview
1.9 has Enumerable#each_with_object, but 1.8 does not. This provides 1.8 compat for the places where we use each_with_object.
Instance Method Summary collapse
Instance Method Details
#each_with_object(object) ⇒ Object
4 5 6 7 |
# File 'lib/interpol/each_with_object.rb', line 4 def each_with_object(object) each { |item| yield item, object } object end |