Class: ProconBypassMan::RemoteAction::RemotePbmJob::BaseAction

Inherits:
Object
  • Object
show all
Defined in:
lib/procon_bypass_man/remote_action/remote_pbm_job/base_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pbm_job_uuid:) ⇒ BaseAction

Returns a new instance of BaseAction.

Parameters:

  • pbm_job_uuid (String)


11
12
13
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/base_action.rb', line 11

def initialize(pbm_job_uuid: )
  self.pbm_job_uuid = pbm_job_uuid
end

Instance Attribute Details

#pbm_job_uuidObject

Returns the value of attribute pbm_job_uuid.



8
9
10
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/base_action.rb', line 8

def pbm_job_uuid
  @pbm_job_uuid
end

Instance Method Details

#action_content(_args) ⇒ void

This method returns an undefined value.

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/base_action.rb', line 16

def action_content(_args)
  raise NotImplementedError, nil
end

#run!(job_args:) ⇒ void

This method returns an undefined value.

Parameters:

  • args (Hash)


22
23
24
25
26
27
28
29
# File 'lib/procon_bypass_man/remote_action/remote_pbm_job/base_action.rb', line 22

def run!(job_args: )
  before_action_callback
  action_content(args: job_args)
  after_action_callback
rescue => e
  be_failed
  ProconBypassMan::SendErrorCommand.execute(error: e)
end