Sha256: d05764c70166c5dccc80619699d50229f2d4177dbb00f3bdac2e58dc4b91310c
Contents?: true
Size: 627 Bytes
Versions: 16
Compression:
Stored size: 627 Bytes
Contents
module Eancom module Edifact class Composite class DataTypeError < StandardError; end attr_reader :data def initialize @data = {} end def add(key, value) if value.kind_of?(Data) @data[key] = value else raise DataTypeError.new('Added value is not of type Data.') end end def get(key) @data[key] end def delete(key) @data.delete(key) end def to_array array = [] @data.each do |key, value| array << key end array end end end end
Version data entries
16 entries across 16 versions & 1 rubygems