category, draft and price in this context are methods representing your model's columns.
They respond to Ruby operators (like <, ==, etc.) and can be combined
with logical operators (& and |) to express complex predicates.

How does it work ?

It introduces a ActiveRecord::Base.attribute(name) class method returning an Arel::Attribute object, which
represent a table column with the given name, that is extended to support Ruby operators.

For convenience, SexyScopes dynamically resolves methods whose name is an existing table column: i.e.
Product.price is a shortcut for Product.attribute(:price).

Please note that this mechanism won't override any of the existing ActiveRecord::Base class methods,
so if you have a column named name for instance, you'll have to use Product.attribute(:name) instead of
Product.name (which would be in this case the class actual name, "Product").

Here is a complete list of operators, and their Arel::Attribute equivalents:

Predicates:

==: eq

=~: matches

!~: does_not_match

>=: gteq

> : gt

< : lt

<=: lteq

!=: not_eq

Logical operators:

&: and

|: or

~: not

Regular Expressions

Did you know that most RDBMS come with pretty good support for regular expressions?

One reason they're quite unpopular in Rails applications is that their syntax is really different amongst
databases implementations.
Let's say you're using SQLite3 in development, and PostgreSQL in testing/production, well that's quite a good reason
not to use database-specific code, isn't it?

Once again, SexyScopes comes to the rescue:
The =~ and !~ operators when called with a regular expression will generate the SQL you don't want to know about.