Class: DatabaseCleaner::CouchPotato::Truncation
- Inherits:
-
Object
- Object
- DatabaseCleaner::CouchPotato::Truncation
- Includes:
- Generic::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 included from Generic::Truncation
Constructor Details
#initialize(options = {}) ⇒ Truncation
Returns a new instance of Truncation.
8 9 10 11 12 13 14 15 |
# File 'lib/database_cleaner/couch_potato/truncation.rb', line 8 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
17 18 19 |
# File 'lib/database_cleaner/couch_potato/truncation.rb', line 17 def clean database.recreate! end |