Skip to content

Instantly share code, notes, and snippets.

@altamic
Created June 10, 2010 13:24
Show Gist options
  • Save altamic/432988 to your computer and use it in GitHub Desktop.
Save altamic/432988 to your computer and use it in GitHub Desktop.
resource_path_name = Rails.root + 'config' + 'properties.xml'
resource_properties = java.util.Properties.new
resource_properties.load_from_xml(java.io.FileInputStream.new(resource_path_name.to_s))
# resource_properties['my.key'] # => 'value'
resource_properties.store_to_xml(java.io.FileOutputStream.new(resource_path_name.to_s), 'jruby rulez')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment