Class | BuilderObject
In: | lib/facets/yore/builderobject.rb
Parent: | Object

# BuilderObject

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.

### Methods

+ builder builder_include method_missing new out to_s

### Public Class methods

builder()
builder_include( mod )
new(explicit=true)

### Public Instance methods

+( op, *args, &blk )
method_missing( op, *a, &b )
out( str=nil )

def builder

      @builder ||= object_class.builder.new

end

to_s()

[Validate]