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

Add Flipper::Feature#disabled? #664

Closed
StoryparkNick opened this issue Sep 8, 2022 · 2 comments
Closed

Add Flipper::Feature#disabled? #664

StoryparkNick opened this issue Sep 8, 2022 · 2 comments

Comments

@StoryparkNick
Copy link

Hi there,

Love the library - one small thing I'd love to see changed is the addition of a disabled? method alongside enabled?.

Sometimes I have to write code like this:

unless Flipper[:feature_name].enabled?(thing) do
  # do something when feature is disabled
end

I would much prefer to write this:

if Flipper[:feature_name].disabled?(thing) do
  # do something when feature is disabled
end

Is this a feature you'd be willing to accept? I'm happy to make a PR if so.

Thanks :)

@jnunemaker
Copy link
Collaborator

@StoryparkNick hi! This has come up a few times before. Check out #494 (comment) first and #514 if you are still curious.

Let me know what you think about either of those.

@StoryparkNick
Copy link
Author

Thanks for that context @jnunemaker, I can see why having a #disabled? method isn't as easy of a win as I thought.

For what it's worth, I'd chuck my hat in the ring for #not_enabled?, but I can always monkey patch my local version.

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

No branches or pull requests

2 participants