Sha256: a4a41c0cc43992d978af5d61f1ea480e7956f55a0c2b53b7723cf53f899284bb
Contents?: true
Size: 848 Bytes
Versions: 15
Compression:
Stored size: 848 Bytes
Contents
# frozen_string_literal: true module Listen module Event class Config attr_reader :listener attr_reader :event_queue attr_reader :min_delay_between_events def initialize( listener, event_queue, queue_optimizer, wait_for_delay, &block) @listener = listener @event_queue = event_queue @queue_optimizer = queue_optimizer @min_delay_between_events = wait_for_delay @block = block end def sleep(seconds) Kernel.sleep(seconds) end def call(*args) @block.call(*args) if @block end def timestamp Time.now.to_f end def callable? @block end def optimize_changes(changes) @queue_optimizer.smoosh_changes(changes) end end end end
Version data entries
15 entries across 15 versions & 2 rubygems