Module: QEnumerable

Includes:
Izzy
Defined in:
lib/qenumerable.rb,
lib/qenumerable/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#find_where(matchers = {}) ⇒ Object



15
16
17
# File 'lib/qenumerable.rb', line 15

def find_where(matchers = {})
  self.find { |s| s.matches_all? matchers }
end

#reject_where(matchers = {}) ⇒ Object



11
12
13
# File 'lib/qenumerable.rb', line 11

def reject_where(matchers = {})
  self.reject { |s| s.matches_all? matchers }
end

#select_where(matchers = {}) ⇒ Object



7
8
9
# File 'lib/qenumerable.rb', line 7

def select_where(matchers = {})
  self.select { |s| s.matches_all? matchers }
end