Class YAML::Store
In: lib/yaml/store.rb
Parent: PStore

Methods

dump   load   load_file   new  

Public Class methods

[Source]

    # File lib/yaml/store.rb, line 8
 8:   def initialize( *o )
 9:     @opt = YAML::DEFAULTS.dup
10:     if String === o.first
11:       super(o.shift)
12:     end
13:     if o.last.is_a? Hash
14:       @opt.update(o.pop)
15:     end
16:   end

Public Instance methods

[Source]

    # File lib/yaml/store.rb, line 18
18:   def dump(table)
19:     @table.to_yaml(@opt)
20:   end

[Source]

    # File lib/yaml/store.rb, line 22
22:   def load(content)
23:     YAML::load(content)
24:   end

[Source]

    # File lib/yaml/store.rb, line 26
26:   def load_file(file)
27:     YAML::load(file)
28:   end

[Validate]