Sha256: 3baf24e14cbea9dfcf194638ca2eb3566745ad8a6b1f7fb87063a9fd623d7f73

Contents?: true

Size: 611 Bytes

Versions: 2

Compression:

Stored size: 611 Bytes

Contents

module Tufy
  module Fields
    module Account
      class BuildClosedDateField < 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::CLOSED_DATE_TAG +
            FormatStrings::F2TS % transform_date(raw_data[:closed_date]).size +
            transform_date(raw_data[:closed_date])
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tufy-0.0.8 lib/tufy/fields/account/build_closed_date_field.rb
tufy-0.0.7 lib/tufy/fields/account/build_closed_date_field.rb