Module: SorbetRails

Extended by:
T::Sig
Defined in:
lib/sorbet-rails.rb,
lib/sorbet-rails/config.rb,
lib/sorbet-rails/deprecation.rb,
lib/sorbet-rails/sorbet_utils.rb,
lib/sorbet-rails/job_rbi_formatter.rb,
lib/sorbet-rails/mailer_rbi_formatter.rb,
lib/sorbet-rails/rails_mixins/custom_finder_methods.rb

Overview

typed: false

Defined Under Namespace

Modules: CustomFinderMethods, ModelColumnUtils, ModelPlugins, ModelUtils, PluckToTStruct, SorbetUtils, Utils Classes: ActiveRecordRbiFormatter, Config, HelperRbiFormatter, JobRbiFormatter, MailerRbiFormatter, ModelRbiFormatter, Railtie, RoutesRbiFormatter, TypedEnumConfig

Constant Summary collapse

TypeAssertDeprecation =
ActiveSupport::Deprecation.new('0.7', 'SorbetRails')

Class Method Summary collapse

Class Method Details

.configObject


19
20
21
# File 'lib/sorbet-rails/config.rb', line 19

def config
  @_config ||= Config.new
end

.configure {|config| ... } ⇒ Object

Yields:


10
11
12
13
14
15
16
# File 'lib/sorbet-rails/config.rb', line 10

def configure(&blk)
  yield config

  # After user has configured, register any plugins the user has added to
  # their configuration.
  register_configured_plugins
end

.register_configured_pluginsObject


24
25
26
27
28
# File 'lib/sorbet-rails/config.rb', line 24

def register_configured_plugins
  config.enabled_plugins.each do |plugin_name|
    SorbetRails::ModelRbiFormatter.register_plugin_by_name(plugin_name)
  end
end