Class: DatabaseFlusher::Cleaner
- Inherits:
-
Object
- Object
- DatabaseFlusher::Cleaner
- Defined in:
- lib/database_flusher/cleaner.rb
Instance Attribute Summary collapse
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Instance Method Summary collapse
- #clean ⇒ Object
- #clean_with(name) ⇒ Object
-
#initialize(orm) ⇒ Cleaner
constructor
A new instance of Cleaner.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(orm) ⇒ Cleaner
Returns a new instance of Cleaner.
6 7 8 9 |
# File 'lib/database_flusher/cleaner.rb', line 6 def initialize(orm) @orm = orm reset_strategy end |
Instance Attribute Details
#strategy ⇒ Object
Returns the value of attribute strategy.
4 5 6 |
# File 'lib/database_flusher/cleaner.rb', line 4 def strategy @strategy end |
Instance Method Details
#clean ⇒ Object
36 37 38 |
# File 'lib/database_flusher/cleaner.rb', line 36 def clean strategy.clean end |
#clean_with(name) ⇒ Object
23 24 25 26 |
# File 'lib/database_flusher/cleaner.rb', line 23 def clean_with(name) self.strategy = name strategy.clean_all end |
#start ⇒ Object
28 29 30 |
# File 'lib/database_flusher/cleaner.rb', line 28 def start strategy.start end |
#stop ⇒ Object
32 33 34 |
# File 'lib/database_flusher/cleaner.rb', line 32 def stop strategy.stop end |