Created
October 13, 2011 03:04
-
-
Save agate/1283240 to your computer and use it in GitHub Desktop.
Ruby Script For Testing to_yaml method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
data = [] | |
File.read("text.txt").lines.each do |line| | |
data << line | |
end | |
puts data.to_yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
© |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment