Class: HR_Deploy::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/hr_deploy/tasks/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_timeObject

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

#errorObject

Returns the value of attribute error.



8
9
10
# File 'lib/hr_deploy/tasks/task.rb', line 8

def error
  @error
end

#start_timeObject

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_instructionObject



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