# This class is used to contain a single +screen+ element (an instance of Hpricot::Elem) as well as any variable # assignments that have been made. Basically, it is simply used by +Rtml::ReverseEngineering::Simulator+ to check # for circular pathways. If two identical snapshots would be created, then it stands to reason that the resultant # pathways for those two snapshots will also be identical. If you're following a path and creating snapshots at every # step of the way, and two snapshots match, then using that logic, those two snapshots would indicate a circular # pathway. (It comes down to either that, or waiting to catch a stack overflow error, which is less than optimal.) # class Rtml::ReverseEngineering::Simulator::Snapshot attr_reader :screen, :variables def initialize(screen, variables) @screen, @variables = screen, variables.dup end def ==(other_snapshot) @screen == other_snapshot.screen && variables == other_snapshot.variables end end