Method: EdifactConverter::CommandLineParser.parse
- Defined in:
- lib/edifact_converter/command_line_parser.rb
.parse ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/edifact_converter/command_line_parser.rb', line 52 def parse parser.parse! if ARGV.size != 1 puts "Wrong number of arguments, run #{$COMMAND_NAME} -h for a list of possible arguments." exit end [:input] = Pathname.new ARGV.first unless [:source] if [:input].extname =~ /xml/ [:source] = :xml else [:source] = :edifact end end end |