Sha256: e2f3d3bfed1a965b082fdba3d69877a5a230275b1ff9fdce8616da150903fe69
Contents?: true
Size: 668 Bytes
Versions: 39
Compression:
Stored size: 668 Bytes
Contents
module YPetri::Simulation::Timeless # A timeless recorder. # class Recorder < YPetri::Simulation::Recorder attr_reader :next_event # Like +YPetri::Simulation::Recording#reset+, but allowing for additional # named argument +:next_sample+ that sets the event (label, hash key) of # the next sample. # def reset! **nn super @next_event = nn[:next_event] || 0 end private # Records the current system state under a numbered sample. # def sample! super next_event @next_event = @next_event.next # "event" shoud implement next method end end # Recorder end # YPetri::Simulation::Timeless
Version data entries
39 entries across 39 versions & 1 rubygems