lib/fusuma/plugin/buffers/keypress_buffer.rb in fusuma-plugin-keypress-0.1.1 vs lib/fusuma/plugin/buffers/keypress_buffer.rb in fusuma-plugin-keypress-0.2.0

- old
+ new

@@ -10,9 +10,14 @@ # @param event [Event] def buffer(event) return if event&.tag != source @events.push(event) + end + + def clear_expired(*) + return if @events.empty? + @events.clear if released? end def empty? @events.empty?