Module: Cuboid::Application::PrependMethods
- Defined in:
- lib/cuboid/application.rb
Instance Method Summary collapse
-
#clean_up ⇒ Object
Cleans up the framework; should be called after running the audit or after canceling a running scan.
- #run ⇒ Object
- #shutdown ⇒ Object
Instance Method Details
#clean_up ⇒ Object
Cleans up the framework; should be called after running the audit or after canceling a running scan.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/cuboid/application.rb', line 53 def clean_up return if @cleaned_up @cleaned_up = true state.resume state.status = :cleanup @finish_datetime = Time.now @start_datetime ||= Time.now state.running = false super if defined? super true end |
#run ⇒ Object
[View source]
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/cuboid/application.rb', line 31 def run if !self.class.( ) fail ArgumentError, 'Invalid options!' end prepare return if aborted? || suspended? state.status = :running super if defined? super return if aborted? || suspended? clean_up state.status = :done true end |
#shutdown ⇒ Object
[View source]
71 72 73 |
# File 'lib/cuboid/application.rb', line 71 def shutdown super if defined? super end |