Sha256: f1926a49f8347942822fd5e435e50c8f0f5a4075e587574261659c8396ccf38f

Contents?: true

Size: 886 Bytes

Versions: 5

Compression:

Stored size: 886 Bytes

Contents

# frozen_string_literal: true

require 'ofx-parser'

module Aranha
  module Parsers
    module Patches
      module OfxParser
        module OfxParser
          def self.included(base)
            base.class_eval do
              class << self
                prepend ClassMethods
              end
            end
          end

          module ClassMethods
            def build_transaction(transaction)
              r = super
              r.currate = (transaction / 'CURRENCY/CURRATE').inner_text
              r
            end
          end
        end

        module Transaction
          attr_accessor :currate, :cursym
        end
      end
    end
  end
end

require 'eac_ruby_utils/patch'

EacRubyUtils.patch(OfxParser::OfxParser, Aranha::Parsers::Patches::OfxParser::OfxParser)
EacRubyUtils.patch(OfxParser::Transaction, Aranha::Parsers::Patches::OfxParser::Transaction)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aranha-parsers-0.25.0 lib/aranha/parsers/patches/ofx_parser.rb
aranha-parsers-0.24.0 lib/aranha/parsers/patches/ofx_parser.rb
aranha-parsers-0.23.1 lib/aranha/parsers/patches/ofx_parser.rb
aranha-parsers-0.23.0 lib/aranha/parsers/patches/ofx_parser.rb
aranha-parsers-0.22.0 lib/aranha/parsers/patches/ofx_parser.rb