Class: CodinRep::DelEmployee

Inherits:
EmployeeCommand show all
Defined in:
lib/codin_rep/del_employee.rb

Constant Summary collapse

COMMAND_CODE =
"016j1".freeze
EXPECTED_HEADER =
"REP003j1\0".freeze
REGISTRATION_COMPLETED_HEADER =
'PGREP010j1'.freeze

Constants inherited from EmployeeCommand

EmployeeCommand::CODE_MAX_SIZE

Constants inherited from Command

Command::COMMAND_PREFIX

Instance Method Summary collapse

Methods inherited from EmployeeCommand

#check_response_header, #execute, #get_data_from_response_payload, #get_expected_response_size, #get_response_payload

Methods inherited from Command

#check_response_header, #execute, #generate_header, #get_data_from_response_payload, #get_expected_response_size, #get_max_attempts, #get_timeout_time, #should_close_connection?

Constructor Details

#initialize(registration, *args) ⇒ DelEmployee

Returns a new instance of DelEmployee.



29
30
31
32
# File 'lib/codin_rep/del_employee.rb', line 29

def initialize(registration, *args)
  super(*args)
  @registration = convert_integer_to_byte_string(registration)
end

Instance Method Details

#generate_command_payloadObject



34
35
36
# File 'lib/codin_rep/del_employee.rb', line 34

def generate_command_payload
  @registration
end