Sha256: 60bda40128aa0ed40526e536930087e7d3d84aa613035e22fd8cb5456e07161f

Contents?: true

Size: 591 Bytes

Versions: 7

Compression:

Stored size: 591 Bytes

Contents

module Tufy
  module Fields
    module Account
      class BuildAccountStatusField < 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_STATUS_TAG +
            FormatStrings::F2TS % raw_data[:account_status].size +
            raw_data[:account_status]
        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_status_field.rb
tufy-0.0.12 lib/tufy/fields/account/build_account_status_field.rb
tufy-0.0.11 lib/tufy/fields/account/build_account_status_field.rb
tufy-0.0.10 lib/tufy/fields/account/build_account_status_field.rb
tufy-0.0.9 lib/tufy/fields/account/build_account_status_field.rb
tufy-0.0.8 lib/tufy/fields/account/build_account_status_field.rb
tufy-0.0.7 lib/tufy/fields/account/build_account_status_field.rb