Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add binding & condition method aliases back in #18

Open
wants to merge 1 commit into from

3 participants

Mike Skalnik alindeman Joe Kutner
Mike Skalnik

I've added the binding & condition method aliases back in. These were removed in August 2010 by Matt Smith saying they were "causing conflicts", however just having b and c makes the rules very hard to read for someone unfamiliar with the syntax.

I've run the project I'm working on now with this change, and the test suite, and have encountered no issues.

Joe Kutner
Owner

Wow, i'm just now seeing this pull request for the first time. My apologies. I'll take a look ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/rule_helper.rb
6 lib/rule_helper.rb
View
@@ -35,11 +35,15 @@ def method
def b(variable_name)
Ruleby::Ferrari::BindingBuilder.new(variable_name)
end
+
+ alias_method :binding, :b
def c(&block)
return lambda(&block)
end
+ alias_method :condition, :c
+
def OR(*args)
Ruleby::Ferrari::OrBuilder.new args
end
@@ -53,4 +57,4 @@ def __eval__(x)
end
end
-end
+end
Something went wrong with that request. Please try again.