Class: HR_Deploy::Task
- Inherits:
-
Object
- Object
- HR_Deploy::Task
- Defined in:
- lib/hr_deploy/tasks/task.rb
Direct Known Subclasses
BackupDBTask, CheckHerokuTask, CheckNetworkTask, CleanNewAssetsTask, CleanOldAssetsTask, DisableMaintenanceTask, DisablePingerTask, EnableMaintenanceTask, EnablePingerTask, MigrateDBTask, OpenAppTask, PrecompileAssetsTask, PushCodeTask, RestartTask
Instance Attribute Summary collapse
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Task
constructor
A new instance of Task.
- #reversal_instruction ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(args = {}) ⇒ Task
12 13 14 15 16 17 18 19 20 |
# File 'lib/hr_deploy/tasks/task.rb', line 12 def initialize(args = {}) @target = args.fetch(:target, nil) @confirm = args.fetch(:confirm, false) @dry_run = args.fetch(:dry_run, false) @success = nil @error = nil @start_time = nil @end_time = nil end |
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time.
10 11 12 |
# File 'lib/hr_deploy/tasks/task.rb', line 10 def end_time @end_time end |
#error ⇒ Object
Returns the value of attribute error.
8 9 10 |
# File 'lib/hr_deploy/tasks/task.rb', line 8 def error @error end |
#start_time ⇒ Object
Returns the value of attribute start_time.
9 10 11 |
# File 'lib/hr_deploy/tasks/task.rb', line 9 def start_time @start_time end |
Instance Method Details
#reversal_instruction ⇒ Object
27 28 29 |
# File 'lib/hr_deploy/tasks/task.rb', line 27 def reversal_instruction nil end |
#successful? ⇒ Boolean
22 23 24 25 |
# File 'lib/hr_deploy/tasks/task.rb', line 22 def successful? raise "Task #{self.class} did not set a proper success status" if success.nil? success end |