Last active
October 6, 2015 00:57
-
-
Save hachy/7b6f7e9d4843cfc8dba6 to your computer and use it in GitHub Desktop.
yaml to string-array
This file contains 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 = YAML.load_file('sakana.yml') | |
data.keys.each do |k| | |
puts "<item>#{k}</item>" | |
end | |
data.values.each do |v| | |
puts "<item>#{v}</item>" | |
end |
This file contains 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