module JavaProperties
A module to read and write Java properties files
Constants
- VERSION
Current version @return [String]
Public Class Methods
generate(hash, options = {})
click to toggle source
Generates the content of a Java properties file @see Generating::Generator
@param hash [Hash] @param options [Hash] options for the generator @return [String]
# File lib/java-properties.rb, line 24 def self.generate(hash, options = {}) Generating::Generator.generate(hash, options) end
load(path)
click to toggle source
Loads and parses a Java properties file @see Parsing::Parser
@param path [String] @return [Properties]
# File lib/java-properties.rb, line 32 def self.load(path) parse(File.read(path)) end
parse(text)
click to toggle source
Parses the content of a Java properties file @see Parsing::Parser
@param text [String] @return [Properties]
# File lib/java-properties.rb, line 15 def self.parse(text) Parsing::Parser.parse(text) end
write(hash, path, options = {})
click to toggle source
Generates a Java properties file @see Generating::Generator
@param hash [Hash] @param path [String] @param options [Hash] options for the generator
# File lib/java-properties.rb, line 41 def self.write(hash, path, options = {}) File.write(path, generate(hash, options)) end