Sha256: e8ccc37236ab6a9ef78dff9817c2185c54db11f8f8a263a4bfee85166c4d6fbe

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

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

        executed do |ctx|
          ctx.transformed_data =
            ctx.transformed_data +
            transform(ctx).upcase
        end

        private

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

          BuildAccountSegment::Constants::ACCOUNT_TYPE_TAG +
            FormatStrings::F2TS % raw_data[:account_type].size + raw_data[:account_type]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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