def filter(conditions)
      if conditions
        conditions.each do |key, value|
          if self.respond_to?(key)
            self.send(key, value)
          end
        end
      end
    end
def filter(conditions)
      if conditions
        conditions.each do |key, value|
          if self.respond_to?(key)
            self.send(key, value)
          end
        end
      end
    end
A convenience method that takes a hash where each key is
 the symbol of a method, and each value is the parameters
 passed to that method.