Method: Forge::Config#write
- Defined in:
- lib/forge/config.rb
#write(options = {}) ⇒ Object
Writes the configuration file
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/forge/config.rb', line 36 def write(={}) # If we're unit testing then it helps to use a # StringIO object instead of a file buffer io = [:io] || File.open(self.config_file, 'w') io.write JSON.generate(@config) io.close self end |