Skip to content

Instantly share code, notes, and snippets.

@pcreux
Last active June 6, 2018 19:26
Show Gist options
  • Select an option

  • Save pcreux/2f81a7bfe53fd8adcb4f2984c5a37c87 to your computer and use it in GitHub Desktop.

Select an option

Save pcreux/2f81a7bfe53fd8adcb4f2984c5a37c87 to your computer and use it in GitHub Desktop.
Turning imperative conditionals into declarative rules
def webhook?
feature_available? &&
user_authorized? &&
under_plan_limit? &&
under_system_limit?
end
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment