class WsdlMapper::Cli::Generate
Public Instance Methods
all(xsd_file)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 67 def all(xsd_file) file_name = File.basename xsd_file, '.xsd' out = options[:out] || File.join(FileUtils.pwd, file_name) FileUtils.rmtree out if options[:clear] invoke :dom, [xsd_file], options.merge(clear: false) invoke :s8r, [xsd_file], options.merge(clear: false) invoke :d10r, [xsd_file], options.merge(clear: false) end
d10r(xsd_file)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 60 def d10r(xsd_file) generator = WsdlMapper::D10rGeneration::Facade.new(**facade_options(xsd_file, '.xsd')) FileUtils.rmtree out(xsd_file, '.xsd') if options[:clear] generator.generate end
dom(xsd_file)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 46 def dom(xsd_file) generator = WsdlMapper::DomGeneration::Facade.new(**facade_options(xsd_file, '.xsd')) FileUtils.rmtree out(xsd_file, '.xsd') if options[:clear] generator.generate end
facade_options(xsd_file, ext)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 22 def facade_options(xsd_file, ext) { file: xsd_file, out: out(xsd_file, ext), module_path: module_path, docs: options[:docs], separate_modules: options[:separate_modules] } end
file_name(xsd_file, ext)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 40 def file_name(xsd_file, ext) File.basename xsd_file, ext end
module_path()
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 32 def module_path options[:module] ? options[:module].split('::').compact : [] end
out(xsd_file, ext)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 36 def out(xsd_file, ext) options[:out] || File.join(FileUtils.pwd, file_name(xsd_file, ext)) end
s8r(xsd_file)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 53 def s8r(xsd_file) generator = WsdlMapper::S8rGeneration::Facade.new(**facade_options(xsd_file, '.xsd')) FileUtils.rmtree out(xsd_file, '.xsd') if options[:clear] generator.generate end
svc(wsdl_file)
click to toggle source
# File lib/wsdl_mapper/cli/cli.rb, line 78 def svc(wsdl_file) generator = WsdlMapper::SvcGeneration::Facade.new(**facade_options(wsdl_file, '.wsdl')) FileUtils.rmtree out(wsdl_file, '.wsdl') if options[:clear] generator.generate end