A Ruby library since 2004

More of Ruby,
one method
at a time.

A thoughtfully collected set of extensions for Ruby's core classes and standard library. Load the whole core collection or pick just the methods you need.

Version 4.0.0 Ruby 3.1+ BSD 2-Clause

find your facetRuby
# Load only what you need
require 'facets/array/to_ranges'

[1, 2, 3, 6, 7].to_ranges
#=> [1..3, 6..7]
01 Small, focused files02 Core + standard libraries03 Your Ruby, your choices

THE IDEA

Good ideas deserve
a shared home.

Facets brings useful Ruby methods together in a form you can discover, reuse, and improve. Each extension stays easy to find and easy to require.

01 / GRANULAR

One file, one idea

Most methods have their own file. Add a single method without loading a larger set of extensions.

02 / FAMILIAR

Ruby, extended

Build on the classes and modules you already use, from Array and String to parts of the standard library.

03 / COMMUNITY

Made together

Years of contributions and refinement live in one collection, with tests and source credits alongside the code.

MAKE IT YOURS

Start small.
Go further.

Choose the amount of Facets that fits your project. You can change that choice as your needs grow.

See the loading guide
01

A single method

require 'facets/time/stamp'
02

A core class

require 'facets/time'
03

The core collection

require 'facets'
04

A standard library extension

require 'facets/ostruct'

LATEST RELEASE

Fresh facets
for modern Ruby.

Version 4.0.0 makes #try strict and #try! lenient, adds a lib/rails area for Rails-compatible methods, and gives every deprecation a removal date.

Read the release notes
RUBY FACETS4.0.0SEPTEMBER 2026