Sha256: 1298429084215e1db317c34c4a1e72e0db2cb87a60e19cf7e1c1272e7629de75

Contents?: true

Size: 673 Bytes

Versions: 6

Compression:

Stored size: 673 Bytes

Contents

module Tufy
  module Fields
    module Account
      class BuildFreshCashAdvanceField < BuildField
        expects :raw_data
        promises :transformed_data

        executed do |ctx|
          if ctx.raw_data[:fresh_cash_advance]
            ctx.transformed_data =
              ctx.transformed_data +
              transform(ctx).upcase
          end
        end

        private

        def self.transform(ctx)
          raw_data = ctx.raw_data

          BuildAccountSegment::Constants::FRESH_CASH_ADVANCE_TAG +
            FormatStrings::F2TS % raw_data[:fresh_cash_advance].size +
            raw_data[:fresh_cash_advance]
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tufy-0.0.13 lib/tufy/fields/account/build_fresh_cash_advance_field.rb
tufy-0.0.12 lib/tufy/fields/account/build_fresh_cash_advance_field.rb
tufy-0.0.11 lib/tufy/fields/account/build_fresh_cash_advance_field.rb
tufy-0.0.10 lib/tufy/fields/account/build_fresh_cash_advance_field.rb
tufy-0.0.9 lib/tufy/fields/account/build_fresh_cash_advance_field.rb
tufy-0.0.8 lib/tufy/fields/account/build_fresh_cash_advance_field.rb