Module: CFONB::OperationDetails

Defined in:
lib/cfonb/operation_details.rb,
lib/cfonb/operation_details/fee.rb,
lib/cfonb/operation_details/ibe.rb,
lib/cfonb/operation_details/ipy.rb,
lib/cfonb/operation_details/lc2.rb,
lib/cfonb/operation_details/lcc.rb,
lib/cfonb/operation_details/lcs.rb,
lib/cfonb/operation_details/lib.rb,
lib/cfonb/operation_details/mmo.rb,
lib/cfonb/operation_details/nbe.rb,
lib/cfonb/operation_details/nbu.rb,
lib/cfonb/operation_details/npo.rb,
lib/cfonb/operation_details/npy.rb,
lib/cfonb/operation_details/rcn.rb,
lib/cfonb/operation_details/ref.rb,
lib/cfonb/operation_details/base.rb,
lib/cfonb/operation_details/unknown.rb

Defined Under Namespace

Classes: Base, FEE, IBE, IPY, LC2, LCC, LCS, LIB, MMO, NBE, NBU, NPO, NPY, RCN, REF, Unknown

Class Method Summary collapse

Class Method Details

.for(line) ⇒ Object



17
18
19
20
21
# File 'lib/cfonb/operation_details.rb', line 17

def self.for(line)
  return unless line.respond_to?(:detail_code) && line.detail_code != ''

  @details[line.detail_code] || Unknown
end

.register(code, klass) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/cfonb/operation_details.rb', line 7

def self.register(code, klass)
  if klass.const_defined?(:ATTRIBUTES)
    CFONB::Details.class_eval do
      attr_accessor(*klass::ATTRIBUTES)
    end
  end

  @details[code] = klass
end