Class Machinist::Blueprint
In: lib/machinist/blueprint.rb
Parent: Object

A Blueprint defines a method of constructing objects of a particular class.

Methods

Attributes

block  [R] 
klass  [R] 
parent  [R] 

Public Class methods

Construct a blueprint for the given klass.

Pass in the +:parent+ option to define a parent blueprint to apply after this one. You can supply another blueprint, or a class in which to look for a blueprint. In the latter case, make will walk up the superclass chain looking for blueprints to apply.

Public Instance methods

Yields the parent blueprint, its parent blueprint, etc.

Returns the Lathe class used to make objects for this blueprint.

Subclasses can override this to substitute a custom lathe class.

Generate an object from this blueprint.

Pass in attributes to override values defined in the blueprint.

Returns the parent blueprint for this blueprint.

[Validate]