cel 0.1.0 has been released.
Pure Ruby implementation of Google Common Expression Language,
GitHub - google/cel-spec: Common Expression Language -- specification and binary representation.
The Common Expression Language (CEL) implements common semantics for
expression evaluation, enabling different applications to more easily
interoperate.
env = Cel::Environment.new(name: :string, group: :string)
ast = env.compile('name.startsWith("/groups/" + group)')
prg = env.program(ast)
return_value = prg.evaluate(name: Cel::String.new("/groups/
acme.co/documents/secret-stuff"),
group: Cel::String.new("acme.co")))
puts return_value #=> true
# 0.1.0
This is the initial release, where most basic features are implemented.