Created
September 30, 2011 17:20
-
-
Save s6577t/1254403 to your computer and use it in GitHub Desktop.
Blobject for configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MyApplication::Config = ->(config_path) do | |
| if Rails.env.development? | |
| require 'rb-fsevent' | |
| fsevent = FSEvent.new | |
| fsevent.watch config_path do | |
| suppress_warnings do | |
| MyApplication::Config = Blobject.read(config_path) | |
| end | |
| end | |
| fsevent.run | |
| else | |
| MyApplication::Config = Blobject.read(config_path) | |
| end.('config/config.yml') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment