lib/java-properties.rb in java-properties-0.0.1 vs lib/java-properties.rb in java-properties-0.0.2
- old
+ new
@@ -16,14 +16,15 @@
Parsing::Parser.parse(text)
end
# Generates the content of a Java properties file
# @see Generating::Generator
- # @param hash [Hash]
+ # @param hash [Hash]
+ # @param options [Hash] options for the generator
# @return [String]
- def self.generate(hash)
- Generating::Generator.generate(hash)
+ def self.generate(hash, options = {})
+ Generating::Generator.generate(hash, options)
end
# Loads and parses a Java properties file
# @see Parsing::Parser
# @param path [String]
@@ -34,10 +35,11 @@
# Generates a Java properties file
# @see Generating::Generator
# @param hash [Hash]
# @param path [String]
- def self.write(hash, path)
- File.write(path, generate(hash))
+ # @param options [Hash] options for the generator
+ def self.write(hash, path, options = {})
+ File.write(path, generate(hash, options))
end
end
\ No newline at end of file