about summary refs log tree commit diff
path: root/app/lib/command_tag
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-27 11:43:30 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:16 -0500
commit6adde25fb53594235ea1cae5216a3dfdd54ffef1 (patch)
treed0dce0b7127274d3b3ace3db110d3803f4ae27b2 /app/lib/command_tag
parent708fda8f29cf35dfd1d53078b1204fdb79bbc5e3 (diff)
[Command Tags] Simplify filtering of statement handler names
Diffstat (limited to 'app/lib/command_tag')
-rw-r--r--app/lib/command_tag/processor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb
index 4f11c0c0d..cbe5345c0 100644
--- a/app/lib/command_tag/processor.rb
+++ b/app/lib/command_tag/processor.rb
@@ -146,8 +146,8 @@ class CommandTag::Processor
   end
 
   def execute_statements(event)
-    @statements.select { |handler, _| handler.end_with?("_#{event}") }.each do |handler, arguments|
-      public_send(handler, arguments)
+    @statements.each do |handler, arguments|
+      public_send(handler, arguments) if handler.end_with?("_#{event}")
     end
   end