Module: Kubes::Booter
Instance Method Summary collapse
- #boot ⇒ Object
- #run_hook(env = nil) ⇒ Object
-
#run_hooks ⇒ Object
Special boot hooks run super early, even before plugins are loaded.
Instance Method Details
#boot ⇒ Object
3 4 5 |
# File 'lib/kubes/booter.rb', line 3 def boot run_hooks end |
#run_hook(env = nil) ⇒ Object
18 19 20 21 22 |
# File 'lib/kubes/booter.rb', line 18 def run_hook(env=nil) name = env ? "boot/#{env}" : "boot" path = "#{Kubes.root}/.kubes/#{name}.rb" require path if File.exist?(path) end |
#run_hooks ⇒ Object
Special boot hooks run super early, even before plugins are loaded. Useful for setting env vars and other early things.
config/boot.rb
config/boot/dev.rb
13 14 15 16 |
# File 'lib/kubes/booter.rb', line 13 def run_hooks run_hook run_hook(Kubes.env) end |