Class: SorbetRails::Config

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/sorbet-rails/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/sorbet-rails/config.rb', line 41

def initialize
  @enabled_gem_plugins = []
  @enabled_model_plugins = [
    :active_record_enum,
    :active_record_named_scope,
    :active_record_querying,
    :active_relation_where_not,
    :active_record_attribute,
    :active_record_assoc,
    :active_record_finder_methods,
    :custom_finder_methods,
    :enumerable_collections,
  ]
  @enabled_model_plugins << :active_storage_methods if defined?(T.unsafe(ActiveStorage))
  @extra_helper_includes = []
end

Instance Attribute Details

#enabled_gem_pluginsObject

Returns the value of attribute enabled_gem_plugins.



32
33
34
# File 'lib/sorbet-rails/config.rb', line 32

def enabled_gem_plugins
  @enabled_gem_plugins
end

#enabled_model_pluginsObject

Returns the value of attribute enabled_model_plugins.



35
36
37
# File 'lib/sorbet-rails/config.rb', line 35

def enabled_model_plugins
  @enabled_model_plugins
end

#extra_helper_includesObject

Returns the value of attribute extra_helper_includes.



38
39
40
# File 'lib/sorbet-rails/config.rb', line 38

def extra_helper_includes
  @extra_helper_includes
end

Instance Method Details

#enabled_pluginsObject



59
60
61
# File 'lib/sorbet-rails/config.rb', line 59

def enabled_plugins
  @enabled_model_plugins + @enabled_gem_plugins
end