confparser 0.0.2 → 0.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/confparser.rb +2 -2
- metadata +2 -1
data/lib/confparser.rb
CHANGED
@@ -29,9 +29,9 @@ class ConfParser < Hash
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
|
-
def to_s
|
32
|
+
def to_s (separator = ' = ')
|
33
33
|
map {|key, value|
|
34
|
-
value.is_a?(Hash) ? "[#{key}]\n#{value.to_s.gsub(/^/, ' ')}" : "#{key}
|
34
|
+
value.is_a?(Hash) ? "[#{key}]\n#{value.to_s(separator).gsub(/^/, ' ')}" : "#{key}#{separator}#{value.to_s}"
|
35
35
|
}.join("\n")
|
36
36
|
end
|
37
37
|
}
|