I would like to parse again some Thor options outside of a Thor class as I have no control on the Thor class and the instance of it. Unfortunately the parse
function is not for getting the values out of the argv. What I already looked for:
- https://www.rubydoc.info/github/wycats/thor/Thor/Option#parse-class_method
- https://github.com/rails/thor/blob/main/lib/thor/parser/options.rb
- https://github.com/rails/thor/blob/main/lib/thor/parser/option.rb
I whould like the following:
Class Mycli < Thor def someOptions option :aaaa, aliases: :a, type: :string, desc: "AAAAAAAAAAAAAA" option :bbbb, aliases: :b, type: :string, desc: "BBBBBBBBBBBBBB" end...end# code having control on:options = Mycli.someOptionsr = options.parse_arg($ARGV) # ["-a" "stringA", "-b", "stringB"]p r[:a] # "StringA"