lib/hieracles/format.rb in hieracles-0.1.7 vs lib/hieracles/format.rb in hieracles-0.2.0
- old
+ new
@@ -52,7 +52,16 @@
end
def build_modules_line(key, value)
"#{__callee__} not implemented, please inherit from the Hieracles::Format class to implement a format.\n"
end
+
+ def is_merged?(v)
+ v[:value].is_a?(Array) && (v[:value] | v[:merged]) != v[:value]
+ end
+
+ def sanitize(v)
+ v.to_s.gsub('%', '%%')
+ end
+
end
end