diff --git a/libraries/config.rb b/libraries/config.rb index 6ced283..a4880c7 100644 --- a/libraries/config.rb +++ b/libraries/config.rb @@ -11,6 +11,14 @@ def initialize(file) read end + protected + + def options_php_json + @options.to_json.gsub('\\', '\\\\\\').gsub("'", "\\\\'") + end + + public + def [](index) @options[index] end @@ -38,7 +46,7 @@ def read() begin return unless ::File.exists?(@file) f = IO.popen('php', 'r+') - f.write "