Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method_option does not correctly parsed #808

Closed
daddygongon opened this issue Jan 13, 2023 · 3 comments · Fixed by #856
Closed

method_option does not correctly parsed #808

daddygongon opened this issue Jan 13, 2023 · 3 comments · Fixed by #856

Comments

@daddygongon
Copy link

daddygongon commented Jan 13, 2023

The method_option as shown below works expectedly:

    method_option :force, :type => :boolean, :default => false,
                         :aliases => "-f", :desc => "forcely replace"

When using format below, it does not work

    method_option :force => false, :aliases => "-f", :desc => "forcely replace"

If the code is wrong, the sample on the document below should be written in more detail.

Thanks!

@p8
Copy link
Member

p8 commented Aug 9, 2023

I think the problem here is that there are two separate methods:

    method_option  :force => false, :aliases => "-f", :desc => "forcely replace" # does not work
    method_options :force => false, :aliases => "-f", :desc => "forcely replace" # does work

@daddygongon
Copy link
Author

Sorry, the long time makes me lost the point.

@mensfeld
Copy link

It's interesting because it did work for me. I had aliases working and had to apply following patch in Karafka after 1.3.0 was released yesterday: karafka/karafka#1678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants