Sha256: 9166a4f0f26919a57a5003a982fb67a81f149773fe65b3e8d1b23a16c3fb2df7

Contents?: true

Size: 662 Bytes

Versions: 10

Compression:

Stored size: 662 Bytes

Contents

# -*- coding: utf-8 -*-
require 'yaml'
require 'coderay'
require 'pp'
yaml =<<EOF
:file:
  :opts:
    :short: "-f"
    :long: "--ファイル"
    :desc: File操作
  :title: ファイル操作file
  :cont:
  - c-x c-f, Find file, ファイルを開く
  - c-x c-s, Save file, ファイルを保存
  - c-x c-w, Write file NAME, ファイルを別名で書き込む
EOF
pp data=YAML.load(yaml)
print YAML.dump(data)


data0={:new_item=>
  {: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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
my_help-0.7.1 before_gli/lib/my_help/test.rb
my_help-0.7.0 before_gli/lib/my_help/test.rb
my_help-0.6.2 lib/my_help/test.rb
my_help-0.6.1 lib/my_help/test.rb
my_help-0.6.0 lib/my_help/test.rb
my_help-0.5.2 lib/my_help/test.rb
my_help-0.5.1 lib/my_help/test.rb
my_help-0.5.0 lib/my_help/test.rb
my_help-0.4.5 lib/my_help/test.rb
my_help-0.4.4 lib/my_help/test.rb