lib/definitions/segments/manual/envelopes/iea.rb in eddy-0.4.0 vs lib/definitions/segments/manual/envelopes/iea.rb in eddy-0.5.0
- old
+ new
@@ -6,15 +6,16 @@
# - Name: Interchange Control Trailer
# - Purpose: To define the end of an interchange of zero or more functional groups and interchange-related control segments.
class IEA < Eddy::Segment
# @param store [Eddy::Data::Store]
- # @param interchange_control_number [Integer]
+ # @param interchange_control_number [Integer] A unique *interchange control number*.
+ # @param number_of_functional_groups [Integer] Number of functional groups included in an Interchange.
# @return [void]
- def initialize(store, interchange_control_number)
+ def initialize(store, interchange_control_number, number_of_functional_groups)
@id = "IEA"
@name = "Interchange Control Trailer"
- @iea01 = Eddy::Elements::I16.new(ref: "IEA01", req: "M", val: store.number_of_included_functional_groups)
+ @iea01 = Eddy::Elements::I16.new(ref: "IEA01", req: "M", val: number_of_functional_groups)
@iea02 = Eddy::Elements::I12.new(ref: "IEA02", req: "M", val: interchange_control_number)
super(store, @iea01, @iea02)
end
# ### ISA01