bin/xsd2ruby.rb in soap4r-1.5.6 vs bin/xsd2ruby.rb in soap4r-1.5.7

- old
+ new

@@ -8,11 +8,14 @@ class XSD2RubyApp < Logger::Application private OptSet = [ ['--xsd','-x', GetoptLong::REQUIRED_ARGUMENT], - ['--classname','-n', GetoptLong::NO_ARGUMENT], + ['--module_path','-m', GetoptLong::REQUIRED_ARGUMENT], + ['--classdef','-e', GetoptLong::OPTIONAL_ARGUMENT], + ['--mapping_registry','-r', GetoptLong::NO_ARGUMENT], + ['--mapper','-p', GetoptLong::NO_ARGUMENT], ['--force','-f', GetoptLong::NO_ARGUMENT], ['--quiet','-q', GetoptLong::NO_ARGUMENT], ] def initialize @@ -41,15 +44,18 @@ puts <<__EOU__ Usage: #{ $0 } --xsd xsd_location [options] xsd_location: filename or URL Example: - #{ $0 } --xsd myapp.xsd --classname Foo + #{ $0 } --xsd myapp.xsd --classdef foo Options: --xsd xsd_location - --classname classname + --classdef [filenameprefix] + --mapping_registry + --mapper + --module_path [Module::Path::Name] --force --quiet __EOU__ exit 1 end @@ -60,10 +66,12 @@ begin getoptlong.each do |name, arg| case name when "--xsd" xsd = arg - when "--classname" + when "--module_path" + opt['module_path'] = arg + when "--classdef", "--mapping_registry", "--mapper" opt[name.sub(/^--/, '')] = arg.empty? ? nil : arg when "--force" opt['force'] = true when "--quiet" opt['quiet'] = true