01 / GRANULAR
One file, one idea
Most methods have their own file. Add a single method without loading a larger set of extensions.
A Ruby library since 2004
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
# Load only what you need
require 'facets/array/to_ranges'
[1, 2, 3, 6, 7].to_ranges
#=> [1..3, 6..7]
THE IDEA
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
Most methods have their own file. Add a single method without loading a larger set of extensions.
02 / FAMILIAR
Build on the classes and modules you already use, from Array and String to parts of the standard library.
03 / COMMUNITY
Years of contributions and refinement live in one collection, with tests and source credits alongside the code.
MAKE IT YOURS
Choose the amount of Facets that fits your project. You can change that choice as your needs grow.
See the loading guiderequire 'facets/time/stamp'require 'facets/time'require 'facets'require 'facets/ostruct'LATEST RELEASE
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.