summaryrefslogtreecommitdiffstats
path: root/lib/puppet/ssl/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/ssl/base.rb')
-rw-r--r--lib/puppet/ssl/base.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/ssl/base.rb b/lib/puppet/ssl/base.rb
index 08efb314b..a005bfaf0 100644
--- a/lib/puppet/ssl/base.rb
+++ b/lib/puppet/ssl/base.rb
@@ -2,6 +2,17 @@ require 'puppet/ssl'
# The base class for wrapping SSL instances.
class Puppet::SSL::Base
+ # For now, use the YAML separator.
+ SEPARATOR = "\n---\n"
+
+ def self.from_multiple_s(text)
+ text.split(SEPARATOR).collect { |inst| from_s(inst) }
+ end
+
+ def self.to_multiple_s(instances)
+ instances.collect { |inst| inst.to_s }.join(SEPARATOR)
+ end
+
def self.wraps(klass)
@wrapped_class = klass
end