Method: Stool::BaseObj.fromYAML

Defined in:
lib/stool/Core/BaseObj.rb

.fromYAML(path) ⇒ Object

加载从yaml



23
24
25
26
27
28
# File 'lib/stool/Core/BaseObj.rb', line 23

def self.fromYAML(path)
  if File.exist?(path)
    content = File.open(path)
    YAML.load(content)
  end
end