Class: CFONB::OperationDetails::Unknown

Inherits:
Base
  • Object
show all
Defined in:
lib/cfonb/operation_details/unknown.rb

Constant Summary collapse

ATTRIBUTES =
%i[unknown].freeze

Class Method Summary collapse

Methods inherited from Base

inherited

Class Method Details

.apply(details, line) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cfonb/operation_details/unknown.rb', line 8

def self.apply(details, line)
  details.unknown ||= {}
  code = line.detail_code.gsub(' ', '_')

  details.unknown[code] =
    if details.unknown[code] && line.detail.is_a?(String)
      details.unknown[code] + "\n#{line.detail}"
    else
      line.detail
    end
end