You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I need to generate conditions for the rule dynamically based on the user input. For example, this is what am trying to do.
def convert(title, variables)
engine.rule title do |variables|
forall {
has :_, :id, :Id
variables.each do |v|
has :Id, v.downcase.to_sym, v.capitalize.to_sym
end
}
end
end
Similarly for other matchers after has, I want to dynamically set them. However seems like I can't pass any of my variables into the rule block. Is there anyway of doing this? Can I extend the DSL for this functionality? Based on the documentation, it seems that the DSL extension is only for actions. Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I have a situation where I need to generate conditions for the rule dynamically based on the user input. For example, this is what am trying to do.
Similarly for other matchers after
has
, I want to dynamically set them. However seems like I can't pass any of my variables into the rule block. Is there anyway of doing this? Can I extend the DSL for this functionality? Based on the documentation, it seems that the DSL extension is only for actions. Thanks.The text was updated successfully, but these errors were encountered: