Sha256: e27318a3e47adba9e9f2587aa49b4a75e73aeaff2a2906589e8b9733621b6e44

Contents?: true

Size: 642 Bytes

Versions: 2

Compression:

Stored size: 642 Bytes

Contents

module Tufy
  module Fields
    module Address
      class BuildAddress1Field < 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

          BuildAddressSegment::Constants::ADDRESS_LINE_1_TAG +
            FormatStrings::F2TS % remove_special_characters(raw_data[:address_line_1]).size +
              remove_special_characters(raw_data[:address_line_1])
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tufy-0.0.8 lib/tufy/fields/address/build_address_1_field.rb
tufy-0.0.7 lib/tufy/fields/address/build_address_1_field.rb