Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/datamancer/datastream.rb
Instance Method Summary collapse
Instance Method Details
#where(criteria) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/datamancer/datastream.rb', line 3 def where criteria self.select do |row| result = true criteria.each do |field, value| unless row[field] == value result = false break end end result end end |