Class: Tap::Generator::Manifest
- Inherits:
-
Object
- Object
- Tap::Generator::Manifest
- Defined in:
- lib/tap/generator/manifest.rb
Overview
Manifest records methods called upon it using method_missing. These actions are replayed on a generator in order (for generate) or in reverse order (for destroy).
Instance Method Summary collapse
-
#initialize(actions) ⇒ Manifest
constructor
Makes a new Manifest.
-
#method_missing(action, *args, &block) ⇒ Object
Records an action.
Constructor Details
#initialize(actions) ⇒ Manifest
Makes a new Manifest. Method calls on self are recorded to actions.
10 11 12 |
# File 'lib/tap/generator/manifest.rb', line 10 def initialize(actions) @actions = actions end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(action, *args, &block) ⇒ Object
Records an action.
15 16 17 |
# File 'lib/tap/generator/manifest.rb', line 15 def method_missing(action, *args, &block) @actions << [action, args, block] end |