Sha256: 3a521322ccd46c3a852b47d6f00cb7de777b7d9c60070d845385c4c5330da2cf
Contents?: true
Size: 416 Bytes
Versions: 3
Compression:
Stored size: 416 Bytes
Contents
module PageObject class SectionCollection < Array def find_by(values_hash) find do |section| values_hash.all? { |key, value| value === section.public_send(key) } end end def select_by(values_hash) matches = select do |section| values_hash.all? { |key, value| value === section.public_send(key) } end self.class[*matches] end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
centric_page_object-2.3.1 | lib/page-object/section_collection.rb |
page-object-2.3.1 | lib/page-object/section_collection.rb |
page-object-2.3.0 | lib/page-object/section_collection.rb |