module ViewModel::Callbacks
def run_callback(hook, view, context, **args)
def run_callback(hook, view, context, **args) return if ineligible(view) callback_env = hook.env_class.create(self, view, context, **args) view_name = view.class.view_name self.class.each_callback(hook, view_name) do |callback| callback_env.instance_exec(&callback) end end