Class: DatabaseCleaner::CouchPotato::Truncation
- Inherits:
-
TruncationBase
- Object
- TruncationBase
- DatabaseCleaner::CouchPotato::Truncation
- Defined in:
- lib/database_cleaner/couch_potato/truncation.rb
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(options = {}) ⇒ Truncation
constructor
A new instance of Truncation.
Methods inherited from TruncationBase
Constructor Details
#initialize(options = {}) ⇒ Truncation
Returns a new instance of Truncation.
6 7 8 9 10 11 12 13 |
# File 'lib/database_cleaner/couch_potato/truncation.rb', line 6 def initialize( = {}) if .has_key?(:only) || .has_key?(:except) raise ArgumentError, "The :only and :except options are not available for use with CouchPotato/CouchDB." elsif !.empty? raise ArgumentError, "Unsupported option. You specified #{.keys.join(',')}." end super end |
Instance Method Details
#clean ⇒ Object
15 16 17 |
# File 'lib/database_cleaner/couch_potato/truncation.rb', line 15 def clean database.recreate! end |