lib/telegram/bot/updates_controller/instrumentation.rb in telegram-bot-0.16.1 vs lib/telegram/bot/updates_controller/instrumentation.rb in telegram-bot-0.16.3

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Telegram module Bot class UpdatesController # Most methods are taken from ActionController::Instrumentation, # some are slightly modified. @@ -21,12 +23,12 @@ end def process_action(*args) raw_payload = { controller: self.class.name, - action: action_name, - update: update, + action: action_name, + update: update, } Instrumentation.instrument(:start_processing, raw_payload.dup) Instrumentation.instrument(:process_action, raw_payload) do |payload| begin super @@ -59,25 +61,25 @@ # def cleanup_view_runtime # super - time_taken_in_something_expensive # end # # :api: plugin - def cleanup_view_runtime #:nodoc: + def cleanup_view_runtime # :nodoc: yield end # Every time after an action is processed, this method is invoked # with the payload, so you can add more information. # :api: plugin - def append_info_to_payload(_payload) #:nodoc: + def append_info_to_payload(_payload) # :nodoc: end module ClassMethods # A hook which allows other frameworks to log what happened during # controller process action. This method should return an array # with the messages to be added. # :api: plugin - def log_process_action(_payload) #:nodoc: + def log_process_action(_payload) # :nodoc: [] end end end end