Class: Processors::N26

Inherits:
Processor show all
Defined in:
lib/ynab_convert/processors/n26_processor.rb

Overview

Processor for N26 statements

Instance Method Summary collapse

Methods inherited from Processor

#to_ynab!

Constructor Details

#initialize(filepath:) ⇒ N26

Returns a new instance of N26.

Parameters:

  • filepath (String)

    path to the CSV file



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ynab_convert/processors/n26_processor.rb', line 11

def initialize(filepath:)
  transformers = [
    Transformers::Cleaners::N26.new,
    Transformers::Formatters::N26.new,
    Transformers::Enhancers::N26.new
  ]
  statement = Documents::Statements::N26.new(filepath: filepath)
  ynab4_file = Documents::YNAB4Files::YNAB4File.new(format: :amounts,
                                                    institution_name:
                                         statement.institution_name)

  super(statement: statement, ynab4_file: ynab4_file, transformers:
        transformers)
end