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