Class: DatabaseCleaner::CouchRest::Truncation
- Inherits:
-
TruncationBase
- Object
- TruncationBase
- DatabaseCleaner::CouchRest::Truncation
- Defined in:
- lib/database_cleaner/couchrest/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.
7 8 9 10 11 12 13 14 |
# File 'lib/database_cleaner/couchrest/truncation.rb', line 7 def initialize( = {}) if .has_key?(:only) || .has_key?(:except) raise ArgumentError, "The :only and :except options are not available for use with CouchRest/CouchDB." elsif !.empty? raise ArgumentError, "Unsupported option. You specified #{.keys.join(',')}." end super end |
Instance Method Details
#clean ⇒ Object
16 17 18 |
# File 'lib/database_cleaner/couchrest/truncation.rb', line 16 def clean database.recreate! end |