= Facets FAQs

Q. How do I use the core mixins on object-by-object basis?

A. One way is to use Facets' Capsule library.

     require 'facets/capsule'

     MyStringExts = Capsule.load('facets/string/align')::String

     s = "string"

     s.extend(MyStringExts)

     s.align_right(10)  #=> "    string"

Or handle it using in-module load methods. 

     require 'facets/module/require'

     module MyStringExts
       module_load 'facets/string/align'
       include String
     end

     s = "string"

     s.extend(MyStringExts)

     s.align_right(10)  #=> "    string"


