class Tufy::Fields::Account::BuildInterestAndFeesField

Private Class Methods

transform(ctx) click to toggle source
# File lib/tufy/fields/account/build_interest_and_fees_field.rb, line 16
def self.transform(ctx)
  raw_data = ctx.raw_data

  interest_and_fees = raw_data[:interest_and_fees].to_i
  interest_and_fees = interest_and_fees < 0 ? 0 : interest_and_fees

  BuildAccountSegment::Constants::INTEREST_AND_FEES_TAG +
    FormatStrings::F2TS % interest_and_fees.to_s.size +
      interest_and_fees.to_s
end