Module: Enumerable

Defined in:
lib/capybara-page-object/extensions/enumerable.rb

Overview

need to add each_with_object for Ruby 1.8.7

Instance Method Summary collapse

Instance Method Details

#each_with_object(memo) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/capybara-page-object/extensions/enumerable.rb', line 3

def each_with_object(memo)
  return to_enum :each_with_object, memo unless block_given?
  each do |element|
    yield element, memo
  end
  memo
end