about summary refs log tree commit diff
path: root/app/lib/command_tag/commands
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-24 04:38:43 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:15 -0500
commit4b229e11d875d1a57a381eeb1a5d9ec9f72ec503 (patch)
tree87283bbd03b79be66d4ee71f19d998050075c182 /app/lib/command_tag/commands
parent48e527317f00563c430c73b72304ba74deb5622b (diff)
[Command Tags] Preload statement handlers
Diffstat (limited to 'app/lib/command_tag/commands')
-rw-r--r--app/lib/command_tag/commands/hello_world.rb2
-rw-r--r--app/lib/command_tag/commands/parent_status_tools.rb15
2 files changed, 7 insertions, 10 deletions
diff --git a/app/lib/command_tag/commands/hello_world.rb b/app/lib/command_tag/commands/hello_world.rb
index 4cf17685e..581b21317 100644
--- a/app/lib/command_tag/commands/hello_world.rb
+++ b/app/lib/command_tag/commands/hello_world.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 module CommandTag::Commands::HelloWorld
-  def handle_hello_world_at_start
+  def handle_hello_world_at_start(_)
     @text << "\nHello, world!"
   end
 end
diff --git a/app/lib/command_tag/commands/parent_status_tools.rb b/app/lib/command_tag/commands/parent_status_tools.rb
index df3cd06c6..ab917e8f5 100644
--- a/app/lib/command_tag/commands/parent_status_tools.rb
+++ b/app/lib/command_tag/commands/parent_status_tools.rb
@@ -1,8 +1,6 @@
 # frozen_string_literal: true
-
-# rubocop:disable Layout/ExtraSpacing
 module CommandTag::Commands::ParentStatusTools
-  def handle_publish_once_at_end
+  def handle_publish_once_at_end(_)
     return unless author_of_parent? && !@parent.published?
 
     PublishStatusService.new.call(@parent)
@@ -13,7 +11,7 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_publish_toot_once_at_end                   handle_publish_once_at_end
   alias handle_publish_parent_once_at_end                 handle_publish_once_at_end
 
-  def handle_edit_once_before_save
+  def handle_edit_once_before_save(_)
     return unless author_of_parent?
 
     params = @parent.slice(*UpdateStatusService::ALLOWED_ATTRIBUTES).with_indifferent_access.compact
@@ -27,7 +25,7 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_edit_toot_once_before_save                 handle_edit_once_before_save
   alias handle_edit_parent_once_before_save               handle_edit_once_before_save
 
-  def handle_mute_once_at_end
+  def handle_mute_once_at_end(_)
     return if author_of_parent?
 
     MuteStatusService.new.call(@account, @parent)
@@ -43,7 +41,7 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_hide_toot_once_at_end                      handle_mute_once_at_end
   alias handle_hide_parent_once_at_end                    handle_mute_once_at_end
 
-  def handle_unmute_once_at_end
+  def handle_unmute_once_at_end(_)
     return if author_of_parent?
 
     @account.unmute_status!(@parent)
@@ -59,7 +57,7 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_unhide_toot_once_at_end                    handle_unmute_once_at_end
   alias handle_unhide_parent_once_at_end                  handle_unmute_once_at_end
 
-  def handle_mute_thread_once_at_end
+  def handle_mute_thread_once_at_end(_)
     return if author_of_parent?
 
     MuteConversationService.new.call(@account, @conversation)
@@ -69,7 +67,7 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_hide_thread_once_at_end                    handle_mute_thread_once_at_end
   alias handle_hide_conversation_once_at_end              handle_mute_thread_once_at_end
 
-  def handle_unmute_thread_once_at_end
+  def handle_unmute_thread_once_at_end(_)
     return if author_of_parent? || @conversation.blank?
 
     @account.unmute_conversation!(@conversation)
@@ -79,4 +77,3 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_unhide_thread_once_at_end                  handle_unmute_thread_once_at_end
   alias handle_unhide_conversation_once_at_end            handle_unmute_thread_once_at_end
 end
-# rubocop:enable Layout/ExtraSpacing