Class: Edi::NullProcessor

Inherits:
BaseService show all
Defined in:
app/services/edi/null_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseService

#log_debug, #log_error, #log_info, #log_warning, #logger, #options, #tagged_logger

Constructor Details

#initialize(orchestrator, processor_type, options = {}) ⇒ NullProcessor

Returns a new instance of NullProcessor.



7
8
9
10
11
# File 'app/services/edi/null_processor.rb', line 7

def initialize(orchestrator, processor_type, options = {})
  @orchestrator = orchestrator
  @processor_type = processor_type
  super(options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(_meth, *_args) ⇒ Object



19
20
21
22
# File 'app/services/edi/null_processor.rb', line 19

def method_missing(_meth, *_args)
  # Do nothing
  logger.info "Processor #{processor_type} not defined for #{orchestrator.partner}"
end

Instance Attribute Details

#orchestratorObject (readonly)

Returns the value of attribute orchestrator.



5
6
7
# File 'app/services/edi/null_processor.rb', line 5

def orchestrator
  @orchestrator
end

#processor_typeObject (readonly)

Returns the value of attribute processor_type.



5
6
7
# File 'app/services/edi/null_processor.rb', line 5

def processor_type
  @processor_type
end

Instance Method Details

#process(*args) ⇒ Object

Retrieves messages according to the partner config



14
15
16
17
# File 'app/services/edi/null_processor.rb', line 14

def process(*args)
  # Do nothing
  logger.debug("Processor not defined", processor_type: processor_type, partner: orchestrator.partner)
end