module Dry::System::Plugins::Bootsnap
Constants
- DEFAULT_OPTIONS
Public Class Methods
dependencies()
click to toggle source
@api private
# File lib/dry/system/plugins/bootsnap.rb, line 24 def self.dependencies {bootsnap: "bootsnap"} end
extended(system)
click to toggle source
@api private
Calls superclass method
# File lib/dry/system/plugins/bootsnap.rb, line 16 def self.extended(system) super system.use(:env) system.before(:configure) { setting :bootsnap, default: DEFAULT_OPTIONS } system.after(:configure, &:setup_bootsnap) end
Public Instance Methods
bootsnap_available?()
click to toggle source
@api private
# File lib/dry/system/plugins/bootsnap.rb, line 38 def bootsnap_available? RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.3.0" && RUBY_VERSION < "2.5.0" end
setup_bootsnap()
click to toggle source
Set up bootsnap for faster booting
@api public
# File lib/dry/system/plugins/bootsnap.rb, line 31 def setup_bootsnap return unless bootsnap_available? ::Bootsnap.setup(config.bootsnap.merge(cache_dir: root.join("tmp/cache").to_s)) end