Class: YAML
- Inherits:
-
Object
- Object
- YAML
- Defined in:
- lib/MotionLocalize/android/yaml.rb
Class Method Summary collapse
Class Method Details
.load(content) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/MotionLocalize/android/yaml.rb', line 2 def self.load(content) hash = {} content.split("\n").each do |line| split = line.split(':') key = split[0].strip split[0] = nil value = split.compact.join(':').strip hash[key] = value end hash end |