Class CouchRest::Model::Designs::DesignMapper
In: lib/couchrest/model/designs/design_mapper.rb
Parent: Object

Support class that allows for a model‘s design definition to be converted into an actual design document.

The methods called in a DesignMapper instance will relay the parameters to the appropriate method in the design document.

Methods

Attributes

design_doc  [RW]  Temporary variable storing the design doc
method  [RW]  Basic mapper attributes
model  [RW]  Basic mapper attributes
prefix  [RW]  Basic mapper attributes

Public Class methods

Public Instance methods

Really simple design function that allows a filter to be added. Filters are simple functions used when listening to the _changes feed.

No methods are created here, the design is simply updated. See the CouchDB API for more information on how to use this.

Convenience wrapper to access model‘s type key option.

Add the specified view to the design doc the definition was made in and create quick access methods in the model.

Define a new view re-usable lib for shared functions.

Protected Instance methods

Create accessor in model and assign a new design doc. New design doc is returned ready to use.

[Validate]