Class: RVGP::Fakers::FakeReconciler
- Inherits:
-
Faker::Base
- Object
- Faker::Base
- RVGP::Fakers::FakeReconciler
- Extended by:
- FakerHelpers
- Defined in:
- lib/rvgp/fakers/fake_reconciler.rb
Overview
Contains faker implementations that produce reconciler yamls
Class Method Summary collapse
-
.basic_checking(from: 'Personal:Assets:AcmeBank:Checking', label: nil, format_path: nil, input_path: nil, output_path: nil, income: nil, expense: nil) ⇒ String
Generates a basic reconciler, for use in reconciling a basic_checking feed.
Class Method Details
.basic_checking(from: 'Personal:Assets:AcmeBank:Checking', label: nil, format_path: nil, input_path: nil, output_path: nil, income: nil, expense: nil) ⇒ String
Generates a basic reconciler, for use in reconciling a basic_checking feed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/rvgp/fakers/fake_reconciler.rb', line 49 def basic_checking(from: 'Personal:Assets:AcmeBank:Checking', label: nil, format_path: nil, input_path: nil, output_path: nil, income: nil, expense: nil) raise StandardError if [from, label, input_path, output_path].any?(&:nil?) format = "!!include #{format_path}" if format_path format ||= format("\n%s", DEFAULT_FORMAT.gsub(/^/, ' ').chomp) format BASIC_CHECKING_FEED, from: from, label: label, format: format, input_path: input_path, output_path: output_path, income: hashes_to_yaml_array( [income, { match: '/.*/', to: 'Personal:Income:Unknown' }].flatten.compact ), expense: hashes_to_yaml_array( [expense, { match: '/.*/', to: 'Personal:Expenses:Unknown' }].flatten.compact ) end |