Sha256: 34c14eec301bd150bead79a062c868252ca43ecb78d4f9c04c94bd5d3801da26
Contents?: true
Size: 742 Bytes
Versions: 1
Compression:
Stored size: 742 Bytes
Contents
#!/usr/bin/env ruby require "yaml_master" require "slop" opts = Slop.parse do |o| o.string '-m', '--master', 'master yaml file' o.string '-k', '--key', 'target yaml key (in data: block)' o.string '-o', '--output', 'output filename' o.bool '-a', '--all', 'target all key (defined in yaml_master: block)' o.bool '-h', '--help', 'display this help' o.on '--version', 'print the version' do puts YamlMaster::VERSION exit end end options = opts.to_hash if options[:help] puts opts exit end unless options[:master] raise "--master options is necessary" end yaml_master = YamlMaster.new(options[:master]) if options[:all] yaml_master.generate_all else yaml_master.generate(options[:key], options[:output]) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yaml_master-0.1.0 | exe/yaml_master |