ã¤ã³ã¹ãã¼ã« RubyGemsãã¤ã³ã¹ãã¼ã«ãã¦ãããgem install rbyamlãã§ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã 使ãæ¹ ä½¿ãæ¹ã¯ãã¯ã©ã¹åãYAMLã§ãªãRbYAMLã¨ãªã£ã¦ããç¹ä»¥å¤ã¯Syckã¨ã»ã¼åãã§ãï¼ãªã¹ã8â ï¼â ã ãªã¹ã8ãRbYAMLã®ä½¿ãæ¹ï¼ex-rbyaml1.rbï¼ require 'rubygems' # RubyGemsã使ã£ã¦ã¤ã³ã¹ãã¼ã«ããå ´å require 'rbyaml' ## YAMLããã¥ã¡ã³ããèªã¿è¾¼ã str = File.read('example.yaml') data = RbYAML.load(str) # å¼æ°ã¯æååã¾ãã¯I/O data = RbYAML.load_file('example.yaml') # å¼æ°ã¯ãã¡ã¤ã«å ## YAMLã¹ããªã¼ã ãèªã¿è¾¼ã File.open('example.yaml') do |
{{#tags}}- {{label}}
{{/tags}}