class Eancom::Edifact::DGS

Constants

TAG
TYPE

Attributes

segment_type[R]

Public Class Methods

new( tag: nil, hazard_identification_code: ) click to toggle source
Calls superclass method Eancom::Edifact::Segment::new
# File lib/eancom/edifact/segments/dgs.rb, line 9
def initialize(
  tag: nil,
  hazard_identification_code:
)

  @tag = tag
  @hazard_identification_code = hazard_identification_code

  super(tag: tag || TAG)
end

Public Instance Methods

to_json_hash() click to toggle source
# File lib/eancom/edifact/segments/dgs.rb, line 20
def to_json_hash
  hash = {}
  hash.merge!(hazard_identification_code: @hazard_identification_code)
  hash
end