lib/seam/persistence.rb in seam-0.0.18 vs lib/seam/persistence.rb in seam-0.0.19

- old
+ new

@@ -10,9 +10,15 @@ Seam::InMemory.records .select { |x| x.next_step == step && x.next_execute_at <= Time.now } .map { |x| x.clone } end + def self.find_something_to_do + Seam::InMemory.records + .select { |x| x.next_execute_at <= Time.now } + .map { |x| x.clone } + end + def self.save effort old_record = find_by_effort_id effort.id if old_record Seam::InMemory.records = Seam::InMemory.records.select { |x| x.id != effort.id }.to_a end