I made a Jev gem with an API that feels like it belongs in Ruby
I released jev-feels, a small Ruby/Rails gem for semantic predicates powered by Jev
The basic idea:
Jev.define :urgent, "Needs attention soon"
class Email < ApplicationRecord
include Jev::Model
feels :body, :urgent
end
email.feels?(:urgent)
# => true
Define the meaning once, then use it like a normal Ruby predicate
It also supports choices, scores, batching, pattern matching, ActiveModel validations, and test stubs/replay
Post a comment