Class | BuilderObject |
In: |
lib/facets/yore/builderobject.rb
|
Parent: | Object |
Build content programatically with Ruby and Ruby‘s blocks.
Builders can use either an implict or explicit receiver. Explicit is the default. To use implicit pass the :implicit option to the constructor.
Implict building is more elegant in form, but it is not as functional because it makes it more difficult to refer to external references.
BuilderObject avoides method name clashes by using Functor redirection. Unlike other implementations of the Builder patterns which append ’!’ to builder methods or simply use odd names to avoid clashes, BuilderObject routes all builder method vis the out method.