Module: TestLab::Support::Lifecycle
Instance Method Summary collapse
-
#bounce ⇒ Object
Bounce the object.
-
#build(force = false) ⇒ Object
Build the object.
-
#demolish ⇒ Object
Demolish the object.
-
#recycle(force = false) ⇒ Object
Recycle the object.
Instance Method Details
#bounce ⇒ Object
Bounce the object
37 38 39 40 41 42 |
# File 'lib/testlab/support/lifecycle.rb', line 37 def bounce down up true end |
#build(force = false) ⇒ Object
Build the object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/testlab/support/lifecycle.rb', line 7 def build(force=false) if (force == false) and self.respond_to?(:importable?) and self.respond_to?(:import) and (self.importable? == true) import else create up provision end true end |
#demolish ⇒ Object
Demolish the object
20 21 22 23 24 25 26 |
# File 'lib/testlab/support/lifecycle.rb', line 20 def demolish deprovision down destroy true end |
#recycle(force = false) ⇒ Object
Recycle the object
29 30 31 32 33 34 |
# File 'lib/testlab/support/lifecycle.rb', line 29 def recycle(force=false) demolish build(force) true end |