From e915432306057f67527bdd8a8fbfbbbd45b9625a Mon Sep 17 00:00:00 2001 From: iberianpig Date: Tue, 13 Aug 2024 09:44:08 +0900 Subject: [PATCH] refactor: remove unnecessary arguments and parentheses Fix rubocop Style/SuperCallWithoutParens: Call `super` without arguments and parentheses when the signature is identical. --- lib/fusuma/plugin/buffers/gesture_buffer.rb | 2 +- lib/fusuma/plugin/detectors/detector.rb | 2 +- lib/fusuma/plugin/detectors/hold_detector.rb | 2 +- lib/fusuma/plugin/inputs/input.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fusuma/plugin/buffers/gesture_buffer.rb b/lib/fusuma/plugin/buffers/gesture_buffer.rb index 72de536..cf3503e 100644 --- a/lib/fusuma/plugin/buffers/gesture_buffer.rb +++ b/lib/fusuma/plugin/buffers/gesture_buffer.rb @@ -12,7 +12,7 @@ class GestureBuffer < Buffer DEFAULT_SECONDS_TO_KEEP = 100 def initialize(*args) - super(*args) + super @cache = {} @cache_select_by = {} @cache_sum10 = {} diff --git a/lib/fusuma/plugin/detectors/detector.rb b/lib/fusuma/plugin/detectors/detector.rb index 8d5b555..0e1b404 100644 --- a/lib/fusuma/plugin/detectors/detector.rb +++ b/lib/fusuma/plugin/detectors/detector.rb @@ -9,7 +9,7 @@ module Detectors # Inherite this base class Detector < Base def initialize(*args) - super(*args) + super @tag = self.class.tag @type = self.class.type end diff --git a/lib/fusuma/plugin/detectors/hold_detector.rb b/lib/fusuma/plugin/detectors/hold_detector.rb index ecd9319..f739ed6 100644 --- a/lib/fusuma/plugin/detectors/hold_detector.rb +++ b/lib/fusuma/plugin/detectors/hold_detector.rb @@ -15,7 +15,7 @@ class HoldDetector < Detector BASE_THRESHOLD = 0.7 def initialize(*args) - super(*args) + super @timer = Inputs::TimerInput.instance end diff --git a/lib/fusuma/plugin/inputs/input.rb b/lib/fusuma/plugin/inputs/input.rb index 633e78f..57164be 100644 --- a/lib/fusuma/plugin/inputs/input.rb +++ b/lib/fusuma/plugin/inputs/input.rb @@ -10,7 +10,7 @@ module Inputs # @abstract Subclass and override {#io} to implement class Input < Base def initialize(*args) - super(*args) + super @tag = self.class.name.split("Inputs::").last.underscore end