lib/riddle/configuration/section.rb in riddle-1.0.10 vs lib/riddle/configuration/section.rb in riddle-1.0.11

- old
+ new

@@ -19,11 +19,11 @@ }.collect { |setting| if send(setting) == "" conf = " #{setting} = " else conf = setting_to_array(setting).collect { |set| - " #{setting} = #{set}" + " #{setting} = #{rendered_setting set}" } end conf.length == 0 ? nil : conf }.flatten.compact end @@ -35,9 +35,23 @@ when TrueClass then [1] when FalseClass then [0] else [value] end + end + + def rendered_setting(setting) + return setting unless setting.is_a?(String) + + index = 8100 + output = setting.clone + + while index < output.length + output.insert(index, "\\\n") + index += 8100 + end + + output end end end end