Method: CloudConvert::Collection#where
- Defined in:
- lib/cloudconvert/collection.rb
#where(attrs) ⇒ Object
11 12 13 |
# File 'lib/cloudconvert/collection.rb', line 11 def where(attrs) self.class.new select { |item| attrs.map { |k, v| item.send(k) == v ? true : nil }.compact.length == attrs.length } end |