RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

https://github.com/Qew7/jev-feels

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in