Sha256: 053bf76d434b66923c95d1f11c298dde81a580150523e603daa2dc0dcaa0556a

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

#!/usr/bin/ruby -wKU

if File.symlink?(__FILE__)
  $: << File.join(File.dirname(File.readlink(__FILE__)), '../lib')
else
  $: << File.join(File.dirname(__FILE__), '../lib')
end

require 'ymldot'
require 'optparse'

Version = "0.0.1"
is_output = false
opt = OptionParser.new
opt.version = Version
opt.release = "0.0.1"
opt.on('-o', 'output file to current directory. name is "#{input_filename}.dot"') {|v| is_output = true }
opt.parse!(ARGV)

if is_output
  y = Ymldot.new(ARGV[0])
  open("./#{y.file_name}.dot", "w") do |f|
    f.write(y.dot_generate)
  end
else
  puts Ymldot.new(ARGV[0]).dot_generate
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ymldot-0.0.1 bin/ymldot