Method: CouchbaseModelLogging::Logger#encode

Defined in:
lib/couchbase_model_logging/logger.rb

#encode(hash) ⇒ Object



20
21
22
23
24
# File 'lib/couchbase_model_logging/logger.rb', line 20

def encode(hash)
  yaml = hash.to_yaml
  raise CouchbaseModelLogging::ReplacementError, "Found separator [#{string_separator}] in YAML string" if yaml.index(string_separator)
  yaml + string_separator
end