lib/har/archive.rb in har-0.1.3 vs lib/har/archive.rb in har-0.1.4

- old
+ new

@@ -70,9 +70,17 @@ def entries @entries ||= raw_entries.map { |e| Entry.new(e) } end + def entries_before(time) + raise TypeError, "expected Time" unless time.is_a?(Time) + entries.select do |entry| + return false unless entry.time + entry.started_date_time + entry.time / 1000.0 <= time + end + end + # create a new archive by merging this and another archive def merge(other) assert_archive other