Sha256: 7a11c8c361c90dcfbfb0259a0d575e5b49cabcdf04c67c71fe8bf252f6f00a9a
Contents?: true
Size: 668 Bytes
Versions: 2
Compression:
Stored size: 668 Bytes
Contents
require_relative '../null_logger' module WhirledPeas module Frame class PrintConsumer LOGGER_ID = 'EVENT LOOP' def initialize(logger=NullLogger.new) @logger = logger end def enqueue(name, duration, args) if name == Frame::EOF puts "EOF frame detected" else displayed_for = duration ? "#{duration} second(s)" : '1 frame' args_str = args.empty? ? '' : " (#{args.inspect})" puts "Frame '#{name}' displayed for #{displayed_for}#{args_str}" end end def start end def stop end private attr_reader :logger end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whirled_peas-0.4.1 | lib/whirled_peas/frame/print_consumer.rb |
whirled_peas-0.4.0 | lib/whirled_peas/frame/print_consumer.rb |