Sha256: 87941507b4516fe50be190425a20ab18a66e5eb97a8975eb333135d776a64411

Contents?: true

Size: 986 Bytes

Versions: 7

Compression:

Stored size: 986 Bytes

Contents

module Absa
  module H2h
    module Transmission
      class Reply < Set
        
        class TransmissionStatus < Record; end
        class TransmissionRejectedReason < Record 
          
          set_allowed_characters ('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a.map(&:to_s) + ['.','/','-','&','*',',','(',')','<','+','$',';','>','=',"'",' ', "\""] # move to config file
          
        end
        class EftStatus < Record; end
        class AhvStatus < Record; end
        class AcceptedReportReply < Record; end
        class RejectedMessage < Record; end
        
        def self.hash_from_s(string, transmission_type)
          set_info = {type: self.partial_class_name.underscore, data: []}

          string.split(/^/).each do |line|
            if Set.for_record(line, transmission_type) == self
              set_info[:data] << self.process_record(line[0, 198])
            end
          end

          set_info
        end
      
      end      
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
absa-h2h-0.1.11 lib/absa-h2h/reply.rb
absa-h2h-0.1.10 lib/absa-h2h/reply.rb
absa-h2h-0.1.9 lib/absa-h2h/reply.rb
absa-h2h-0.1.8 lib/absa-h2h/reply.rb
absa-h2h-0.1.7 lib/absa-h2h/reply.rb
absa-h2h-0.1.6 lib/absa-h2h/reply.rb
absa-h2h-0.1.5 lib/absa-h2h/reply.rb