lib/fusuma/plugin/inputs/timer_input.rb in fusuma-2.0.0.pre vs lib/fusuma/plugin/inputs/timer_input.rb in fusuma-2.0.0.pre2

- old
+ new

@@ -1,29 +1,29 @@ # frozen_string_literal: true -require_relative './input.rb' +require_relative './input' module Fusuma module Plugin module Inputs # libinput commands wrapper class TimerInput < Input DEFAULT_INTERVAL = 0.3 def config_param_types { - 'interval': [Float] + interval: [Float] } end - attr_reader :writer + attr_reader :pid def io @io ||= begin - reader, writer = create_io - @pid = start(reader, writer) + reader, writer = create_io + @pid = start(reader, writer) - reader - end + reader + end end def start(reader, writer) pid = fork do timer_loop(reader, writer)