- Inheritance
- < Object
Manifest captures the actions a generator performs. Instantiate a manifest with an optional target object, hammer it with actions, then replay or rewind on the object of your choice.
Example:
manifest = Manifest.new { |m| m.make_directory '/foo' m.create_file '/foo/bar.txt' } manifest.replay(creator) manifest.rewind(destroyer)
Attributes
Name | Visibility | R/W | Description |
---|---|---|---|
target | public | R |
Methods
Class
Visibility | Signature |
---|---|
public | new (target = nil) {|self if block_given?| ...} |
Instance
Visibility | Signature |
---|---|
public | erase () |
public | method_missing (action, *args, &block) |
public | replay (target = nil) |
public | rewind (target = nil) |
Class Method Detail
new(target = nil) {|self if block_given?| ...}
Take a default action target. Yield self if block given.
Instance Method Detail
erase()
Erase recorded actions.
method_missing(action, *args, &block)
Record an action.
replay(target = nil)
Replay recorded actions.
rewind(target = nil)
Rewind recorded actions.