# -*- coding: utf-8 -*- require 'yaml' require 'coderay' require 'pp' yaml =< {:opts=>{:short=>"-n", :long=>"--new_item", :desc=>"new item"}, :title=>"new_item", :cont=> ["new cont"]}} print YAML.dump(data0) puts CodeRay.scan(YAML.dump(data0),:yaml).term puts CodeRay.scan(yaml,:yaml).term