Sha256: 263ca629e0d665b1a1bf6a4a89b9029baa249308e4159f8f7dd55dc9231ea1fc
Contents?: true
Size: 394 Bytes
Versions: 7
Compression:
Stored size: 394 Bytes
Contents
module Druid 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
7 entries across 7 versions & 2 rubygems