trans edited this page Aug 23, 2010 · 1 revision

This “tip” simply adds core/facets to the load path so that methods can be more intuitively cherry picked.

    require 'facets/meta/data.rb
    $LOAD_PATH << Facets.__DIR__ + '/core/facets'

Now you can do:

    require 'kernel/with'
    require 'symbol/to_proc'

I’m not 100% sure this is the best idea, but YMMV.

NOTE: In versions 2.8.x or less you could do the same thing via:

    require 'facets-load'

This file has been deprecated with v3.0+ as a YAGNI. Which explains the existence of this “tip”, if you really do “need” it.