Class Uttk::Filters::Saver
In: lib/uttk/filters/Saver.rb
Parent: Filter

FIXME Path based

This very basic filter, observe a logger, and save all received leaves, without any formatting.

With this observer you save a sort of execution trace. After that you can apply to another logger the same message sequence.

You can also simply check that two results are equal, for that, just compare the sequence message.

Methods

each   get   new   new_leaf   to_uttk_log  

Included Modules

Concrete

Public Class methods

[Source]

# File lib/uttk/filters/Saver.rb, line 26
      def initialize(*a, &b)
        super
        @out = []
      end

Public Instance methods

[Source]

# File lib/uttk/filters/Saver.rb, line 45
      def each ( &block )
        @out.each(&block)
      end

[Source]

# File lib/uttk/filters/Saver.rb, line 35
      def get
        @out.dup
      end

[Source]

# File lib/uttk/filters/Saver.rb, line 31
      def new_leaf ( *args )
        @out << args
      end

[Source]

# File lib/uttk/filters/Saver.rb, line 39
      def to_uttk_log ( log )
        each do |a|
          log.update(:new_leaf, *a)
        end
      end

[Validate]