CmdLineParser.st
branchjv
changeset 19988 148721e96482
parent 18120 e3a375d5f6a8
child 19989 cac9cb31ce9e
equal deleted inserted replaced
19987:bf8b2735f3fd 19988:148721e96482
    73     ^ options
    73     ^ options
    74 !
    74 !
    75 
    75 
    76 options:something
    76 options:something
    77     options := something.
    77     options := something.
       
    78 ! !
       
    79 
       
    80 !CmdLineParser methodsFor:'building'!
       
    81 
       
    82 on: spec description: description do: action
       
    83     | option |
       
    84 
       
    85     option := CmdLineOption new.
       
    86     option spec: spec.
       
    87     option description: description.
       
    88     option action: action.
       
    89     options add: option.
       
    90 
       
    91     "Created: / 14-06-2016 / 06:43:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    92 !
       
    93 
       
    94 on: spec do: action
       
    95     ^ self on: spec description: nil do: action
       
    96 
       
    97     "Created: / 14-06-2016 / 07:02:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    78 ! !
    98 ! !
    79 
    99 
    80 !CmdLineParser methodsFor:'error reporting'!
   100 !CmdLineParser methodsFor:'error reporting'!
    81 
   101 
    82 error: message option: option
   102 error: message option: option
   279 
   299 
   280 version
   300 version
   281     ^'$Header: /cvs/stx/stx/libbasic/CmdLineParser.st,v 1.5 2015-02-13 22:48:41 cg Exp $'
   301     ^'$Header: /cvs/stx/stx/libbasic/CmdLineParser.st,v 1.5 2015-02-13 22:48:41 cg Exp $'
   282 !
   302 !
   283 
   303 
       
   304 version_HG
       
   305 
       
   306     ^ '$Changeset: <not expanded> $'
       
   307 !
       
   308 
   284 version_SVN
   309 version_SVN
   285     ^ '$Id: CmdLineParser.st,v 1.5 2015-02-13 22:48:41 cg Exp $'
   310     ^ '$Id: CmdLineParser.st,v 1.5 2015-02-13 22:48:41 cg Exp $'
   286 ! !
   311 ! !
   287 
   312