Cerealize::Codec::Yaml

Public Instance Methods

decode(str) click to toggle source
    # File lib/cerealize/codec/yaml.rb, line 16
16:     def decode(str)
17:       YAML.load(str)
18:     end
encode(obj) click to toggle source
    # File lib/cerealize/codec/yaml.rb, line 12
12:     def encode(obj)
13:       YAML.dump(obj)
14:     end
yours?(str) click to toggle source

See YAML spec (though might fail if “directives”?)

    # File lib/cerealize/codec/yaml.rb, line 8
 8:     def yours?(str)
 9:       str[0..2] == '---'
10:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.