class Fusuma::Plugin::Buffers::AppmatcherBuffer
Buffer events having KeypressRecord
Constants
- DEFAULT_SOURCE
Public Instance Methods
buffer(event)
click to toggle source
@param event [Event]
# File lib/fusuma/plugin/buffers/appmatcher_buffer.rb, line 11 def buffer(event) return if event&.tag != source @events.push(event) end
clear_expired(*)
click to toggle source
# File lib/fusuma/plugin/buffers/appmatcher_buffer.rb, line 17 def clear_expired(*) @events = [@events.last] if @events.size > 100 end
empty?()
click to toggle source
# File lib/fusuma/plugin/buffers/appmatcher_buffer.rb, line 21 def empty? @events.empty? end