Class: CFONB::OperationDetail::RCN

Inherits:
Object
  • Object
show all
Defined in:
lib/cfonb/operation_detail/rcn.rb

Constant Summary collapse

ATTRIBUTES =
%i[reference purpose].freeze

Class Method Summary collapse

Class Method Details

.apply(operation, line) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/cfonb/operation_detail/rcn.rb', line 10

def self.apply(operation, line)
  operation.reference = [
    operation.reference,
    line.detail[0..34].strip,
  ].filter_map(&:presence).join(' - ')

  operation.purpose = line.detail[35..-1]&.strip
end