Sha256: 11f1813e2a512bf939b0b41aabe6dbfede304b1ef62a8853ff73eb18061a4bca

Contents?: true

Size: 1.74 KB

Versions: 24

Compression:

Stored size: 1.74 KB

Contents

# typed: strict
# frozen_string_literal: true

module RubyLsp
  module Rails
    module Support
      module Callbacks
        MODELS = T.let(
          [
            "before_validation",
            "after_validation",
            "before_save",
            "around_save",
            "after_save",
            "before_create",
            "around_create",
            "after_create",
            "after_commit",
            "after_create_commit",
            "after_update_commit",
            "after_destroy_commit",
            "after_save_commit",
            "after_rollback",
            "before_update",
            "around_update",
            "after_update",
            "before_destroy",
            "around_destroy",
            "after_destroy",
            "after_initialize",
            "after_find",
            "after_touch",
          ].freeze,
          T::Array[String],
        )

        CONTROLLERS = T.let(
          [
            "after_action",
            "append_after_action",
            "append_around_action",
            "append_before_action",
            "around_action",
            "before_action",
            "prepend_after_action",
            "prepend_around_action",
            "prepend_before_action",
            "skip_after_action",
            "skip_around_action",
            "skip_before_action",
          ].freeze,
          T::Array[String],
        )

        JOBS = T.let(
          [
            "after_enqueue",
            "after_perform",
            "around_enqueue",
            "around_perform",
            "before_enqueue",
            "before_perform",
          ].freeze,
          T::Array[String],
        )

        ALL = T.let((MODELS + CONTROLLERS + JOBS).freeze, T::Array[String])
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ruby-lsp-rails-0.3.31 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.30 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.29 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.28 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.27 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.26 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.25 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.24 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.23 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.22 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.21 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.20 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.19 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.18 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.17 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.16 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.15 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.14 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.13 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb
ruby-lsp-rails-0.3.12 lib/ruby_lsp/ruby_lsp_rails/support/callbacks.rb