Class: Ella::Destroyer
- Defined in:
- lib/ella/generator/destroyer.rb
Overview
This reverses the results of the m/v/c and test generators. Right now it destroys everything of a certain name if found. While that seems fairly blunt, there does not currenlty seem to be a reason to make it more specific. Although this is the opposite of a generator, the initialization requires the exact same things, and it makes sense to have the same interface, so it inherits from Generator.
Instance Method Summary collapse
Methods inherited from Generator
Constructor Details
This class inherits a constructor from Ella::Generator
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ella/generator/destroyer.rb', line 12 def run @something_destroyed = false attempt_to_destroy('models') attempt_to_destroy('views') attempt_to_destroy('controllers') # TODO: destroy tests, once rspec is set up Log.info('Nothing to destroy.') unless @something_destroyed end |