Class: HL7::Message::Segment::Default

Inherits:
HL7::Message::Segment show all
Defined in:
lib/segment_default.rb

Overview

Provide a catch-all information preserving segment

  • nb: aliases are not provided BUT you can use the numeric element accessor

seg = HL7::Message::Segment::Default.new
seg.e0 = "NK1"
seg.e1 = "SOMETHING ELSE"
seg.e2 = "KIN HERE"

Constant Summary

Constants inherited from HL7::Message::Segment

METHOD_MISSING_FOR_INITIALIZER

Instance Attribute Summary

Attributes inherited from HL7::Message::Segment

#element_delim, #item_delim, #segment_parent, #segment_weight

Attributes included from HL7::Message::SegmentListStorage

#child_types

Instance Method Summary collapse

Methods inherited from HL7::Message::Segment

#<=>, #each, #elements_from_segment, #has_children?, #is_child_segment=, #is_child_segment?, #length, #method_missing, #to_info, #to_s, #weight

Methods included from HL7::Message::SegmentListStorage

#add_child_type

Methods included from TimeFormatterHelper

#hl7_formatted_date, #hl7_formatted_timestamp

Methods included from HL7::Message::SegmentFields

#[], #[]=, #field_info, included, #read_field, #write_field

Constructor Details

#initialize(raw_segment = "", delims = []) ⇒ Default

Returns a new instance of Default.



12
13
14
15
16
# File 'lib/segment_default.rb', line 12

def initialize(raw_segment = "", delims = [])
  segs = [] if raw_segment == ""
  segs ||= raw_segment
  super(segs, delims)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HL7::Message::Segment