class TimestampAPI::Collection
Public Instance Methods
where(conditions)
click to toggle source
# File lib/timestamp_api/collection.rb, line 3 def where(conditions) raise TimestampAPI::InvalidWhereContitions unless conditions.is_a? Hash conditions.each_with_object(self.dup) do |condition, acc| acc.select! { |i| i.send(condition.first.to_sym) == condition.last } end end