# File lib/edi4r/edifact.rb, line 1366 def initialize(p, tag) super( p, tag ) each_BCDS(tag) do |entry| id = entry.name status = entry.status # FIXME: Code redundancy in type detection - remove later! case id when /[CES]\d{3}/ # Composite add new_CDE(id, status) when /\d{4}/ # Simple DE add new_DE(id, status, fmt_of_DE(id)) else # Should never occur raise "Not a legal DE or CDE id: #{id}" end end end