Sha256: c2ca23e9009ff8f08d26e425199eaef689bdb602f862d44f925f95efb6bd53ea
Contents?: true
Size: 400 Bytes
Versions: 13
Compression:
Stored size: 400 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
13 entries across 13 versions & 1 rubygems