Sha256: 52329d4f1b36d175a004c308622e56dfc2a4247cf98ca65ed9db37d3d46e7c48
Contents?: true
Size: 723 Bytes
Versions: 15
Compression:
Stored size: 723 Bytes
Contents
module Eancom module Edifact class DTM < Segment TAG = 'DTM'.freeze TYPE = :body.freeze attr_accessor :type, :date_time, :format def initialize( tag: nil, type:, date_time:, format: ) @tag = tag @type = type @date_time = date_time @format = format super(tag: @tag || TAG) end def to_json_hash { identifier => { date_time: @date_time } } end def segment_type TYPE end private def identifier @identifier ||= structure.find(:type).dictionary[@type][:identifier] end end end end
Version data entries
15 entries across 15 versions & 1 rubygems