class Eancom::Edifact::EFI

Constants

TAG
TYPE

Attributes

segment_type[R]

Public Class Methods

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

  @tag = tag
  @file_name = file_name
  @file_format_name = file_format_name
  @data_format_description_code = data_format_description_code

  super(tag: tag || TAG)
end

Public Instance Methods

to_json_hash() click to toggle source
# File lib/eancom/edifact/segments/efi.rb, line 25
def to_json_hash
  hash = {}
  hash.merge!(file_name: file_name) if @file_name
  hash.merge!(file_format_name: file_format_name) if @file_format_name
  hash.merge!(data_format_description_code: find_identifier(:data_format_description_code)) if @data_format_description_code
  hash
end