Sha256: 154b81740d999ffbd1375e1a4bb34cc58dac593f74f4328a0e8a8a9f2251f283
Contents?: true
Size: 950 Bytes
Versions: 1
Compression:
Stored size: 950 Bytes
Contents
require "sanctuary" require "sanctuary/planter/parser" require "sanctuary/planter/generator" module Sanctuary module Planter class CLI def self.start if ARGV.include?("-i") classes_array = Sanctuary::Planter::Parser.parse_plant_uml(ARGV[1]) plant_array = Sanctuary::Planter::Parser.generate_plant_data_objects(classes_array) plant_array.each do |plant| Sanctuary::Planter::Generator.generate_file_from_plant(plant) end else system("vim", "tmp.puml") classes_array = Sanctuary::Planter::Parser.parse_plant_uml("./tmp.puml") plant_array = Sanctuary::Planter::Parser.generate_plant_data_objects(classes_array) plant_array.each do |plant| Sanctuary::Planter::Generator.generate_file_from_plant(plant) end File.delete("./tmp.puml") if File.exists? ("./tmp.puml") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sanctuary-planter-0.1.3 | lib/sanctuary/planter/cli.rb |