Class: RailsDevTweaks::Configuration
- Inherits:
-
Object
- Object
- RailsDevTweaks::Configuration
- Defined in:
- lib/rails_dev_tweaks/configuration.rb
Defined Under Namespace
Classes: GranularAutoloadConfiguration
Instance Attribute Summary collapse
-
#granular_autoload_config ⇒ Object
readonly
Returns the value of attribute granular_autoload_config.
-
#log_autoload_notice ⇒ Object
By default, we log a notice on each request that has its to_prepare hooks skipped, you can disable that if you choose!.
Instance Method Summary collapse
-
#autoload_rules(&block) ⇒ Object
Takes a block that configures the granular autoloader’s rules.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails_dev_tweaks/configuration.rb', line 9 def initialize @log_autoload_notice = true @granular_autoload_config = GranularAutoloadConfiguration.new # And set our defaults self.autoload_rules do keep :all skip '/favicon.ico' skip :assets keep :forced end end |
Instance Attribute Details
#granular_autoload_config ⇒ Object (readonly)
Returns the value of attribute granular_autoload_config.
7 8 9 |
# File 'lib/rails_dev_tweaks/configuration.rb', line 7 def granular_autoload_config @granular_autoload_config end |
#log_autoload_notice ⇒ Object
By default, we log a notice on each request that has its to_prepare hooks skipped, you can disable that if you choose!
5 6 7 |
# File 'lib/rails_dev_tweaks/configuration.rb', line 5 def log_autoload_notice @log_autoload_notice end |
Instance Method Details
#autoload_rules(&block) ⇒ Object
Takes a block that configures the granular autoloader’s rules.
25 26 27 |
# File 'lib/rails_dev_tweaks/configuration.rb', line 25 def autoload_rules(&block) @granular_autoload_config.instance_eval(&block) end |