Module: JavaProperties::Generating::Generator
- Defined in:
- lib/java-properties/generating/generator.rb
Overview
This module allows generating the content of a properties file base on a Properties object (or any other hash like structure)
Constant Summary collapse
- KEY_VALUE_SEPARATOR =
Character used for key-value separation
'='
Class Method Summary collapse
-
.generate(properties) ⇒ String
Generates a properties file content based on a hash.
Class Method Details
.generate(properties) ⇒ String
Generates a properties file content based on a hash
17 18 19 20 21 22 23 |
# File 'lib/java-properties/generating/generator.rb', line 17 def self.generate(properties) lines = [] properties.each do |key, value| lines << build_line(key, value) end lines.join("\n") end |