bin/ymldot in ymldot-0.0.2 vs bin/ymldot in ymldot-0.0.3
- old
+ new
@@ -9,19 +9,23 @@
require 'ymldot'
require 'optparse'
Version = "0.0.2"
is_output = false
+is_csv = 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.on('-c', '--csv', 'csv format output') {|v| is_csv = 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)
+ f.write(y.to_dot)
end
+elsif is_csv
+ puts Ymldot.new(ARGV[0]).to_csv
else
- puts Ymldot.new(ARGV[0]).dot_generate
+ puts Ymldot.new(ARGV[0]).to_dot
end