Synopsis
An easy way to implement the facade pattern in your classes. In short,
this library autowraps class methods from another class as instance
methods of the current class.
Prerequisites
Ruby 1.8.0 or later
Installation
rake test (optional)
rake install (non-gem) or rake install_gem (gem)
Usage
require "facade"
class Foo < String
extend Facade
facade File, :dirname, :basename
facade Dir
end
f = Foo.new("/home/djberge")
puts f.basename # 'djberge'
puts f.dirname # '/home'
Acknowledgements
Eero Saynatkari, Eric Hodel and Michael Granger for ideas and code which I
shamelessly plagiarized.
Copyright
Copyright (c) 2005-2007 Daniel J. Berger
Licensed under the same terms as Ruby itself.
Warranty
This package is provided "as is" and without any exblockquotess or
implied warranties, including, without limitation, the implied
warranties of merchantability and fitness for a particular purpose
Author
Daniel J. Berger
djberg96 at nospam at gmail dot com
imperator on IRC (freenode)