Sha256: 81145076b67d7d76cced28510af86edf2a1c52f461cff3931a8295b0e84c0bf3

Contents?: true

Size: 942 Bytes

Versions: 15

Compression:

Stored size: 942 Bytes

Contents

module Eancom
  module Edifact
    class UNA < Segment
      TAG = 'UNA'.freeze
      TYPE = :header.freeze

      attr_reader :tag, :una1, :una2, :una3, :una4, :una5, :una6

      def initialize(tag: nil,
                     una1: ':',
                     una2: '+',
                     una3: '.',
                     una4: '?',
                     una5: ' ',
                     una6: '\''
                    )
        @tag = tag
        @una1 = una1
        @una2 = una2
        @una3 = una3
        @una4 = una4
        @una5 = una5
        @una6 = una6

        super(tag: (tag || TAG))
      end


      def to_s
        stream = ""
        stream << tag
        stream << una1
        stream << una2
        stream << una3
        stream << una4
        stream << una5
        stream << una6
        stream
      end

      def to_json_hash
        {}
      end

      def segment_type
        TYPE
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
eancom-1.6.3 lib/eancom/edifact/segments/una.rb
eancom-1.6.2 lib/eancom/edifact/segments/una.rb
eancom-1.6.0 lib/eancom/edifact/segments/una.rb
eancom-1.5.7 lib/eancom/edifact/segments/una.rb
eancom-1.5.6 lib/eancom/edifact/segments/una.rb
eancom-1.5.5 lib/eancom/edifact/segments/una.rb
eancom-1.5.4 lib/eancom/edifact/segments/una.rb
eancom-1.5.2 lib/eancom/edifact/segments/una.rb
eancom-1.5.1 lib/eancom/edifact/segments/una.rb
eancom-1.5.0 lib/eancom/edifact/segments/una.rb
eancom-1.4.0 lib/eancom/edifact/segments/una.rb
eancom-1.3.0 lib/eancom/edifact/segments/una.rb
eancom-1.2.0 lib/eancom/edifact/segments/una.rb
eancom-1.1.1 lib/eancom/edifact/segments/una.rb
eancom-1.1.0 lib/eancom/edifact/segments/una.rb