eddy 0.8.3 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -4
- data/CHANGELOG.md +51 -1
- data/Gemfile.lock +8 -8
- data/README.md +1 -1
- data/data/code-lists/333.tsv +8 -0
- data/data/segments/amt.segment.yml +7 -0
- data/data/segments/bia.segment.yml +10 -0
- data/data/segments/cur.segment.yml +8 -0
- data/data/segments/dtm.segment.yml +1 -0
- data/data/segments/fob.segment.yml +8 -0
- data/data/segments/itd.segment.yml +13 -0
- data/data/segments/mtx.segment.yml +7 -0
- data/data/segments/n9.segment.yml +7 -0
- data/data/segments/per.segment.yml +13 -0
- data/data/segments/po1.segment.yml +6 -0
- data/data/segments/po3.segment.yml +13 -0
- data/data/segments/qty.segment.yml +10 -0
- data/data/segments/ref.segment.yml +1 -0
- data/data/segments/sac.segment.yml +4 -0
- data/data/segments/sch.segment.yml +7 -0
- data/data/segments/sdq.segment.yml +8 -0
- data/data/segments/txi.segment.yml +9 -0
- data/data/transaction_sets/810.edi.yml +93 -0
- data/data/transaction_sets/846.edi.yml +57 -0
- data/data/transaction_sets/850.edi.yml +73 -0
- data/data/transaction_sets/855.edi.yml +74 -0
- data/data/transaction_sets/856.edi.yml +54 -0
- data/eddy.gemspec +1 -1
- data/exe/eddy +1 -0
- data/lib/definitions/elements/generated/100.currency_code.rb +200 -0
- data/lib/definitions/elements/generated/146.shipment_method_of_payment.rb +65 -0
- data/lib/definitions/elements/generated/1551.message_text.rb +29 -0
- data/lib/definitions/elements/generated/280.exchange_rate.rb +29 -0
- data/lib/definitions/elements/generated/309.location_qualifier.rb +209 -0
- data/lib/definitions/elements/generated/310.location_identifier.rb +29 -0
- data/lib/definitions/elements/generated/311.shipment_type_code.rb +42 -0
- data/lib/definitions/elements/generated/322.load_empty_status_code.rb +40 -0
- data/lib/definitions/elements/generated/325.tax_identification_number.rb +29 -0
- data/lib/definitions/elements/generated/333.terms_basis_date_code.rb +44 -0
- data/lib/definitions/elements/generated/336.terms_type_code.rb +102 -0
- data/lib/definitions/elements/generated/338.terms_discount_percent.rb +29 -0
- data/lib/definitions/elements/generated/351.terms_discount_days_due.rb +30 -0
- data/lib/definitions/elements/generated/363.note_reference_code.rb +278 -0
- data/lib/definitions/elements/generated/364.communication_number.rb +29 -0
- data/lib/definitions/elements/generated/365.communication_number_qualifier.rb +77 -0
- data/lib/definitions/elements/generated/366.contact_function_code.rb +267 -0
- data/lib/definitions/elements/generated/369.free_form_description.rb +29 -0
- data/lib/definitions/elements/generated/370.terms_discount_due_date.rb +29 -0
- data/lib/definitions/elements/generated/371.change_reason_code.rb +67 -0
- data/lib/definitions/elements/generated/378.allowance_charge_percent_qualifier.rb +48 -0
- data/lib/definitions/elements/generated/386.terms_net_days.rb +30 -0
- data/lib/definitions/elements/generated/446.terms_net_due_date.rb +29 -0
- data/lib/definitions/elements/generated/522.amount_qualifier_code.rb +1510 -0
- data/lib/definitions/elements/generated/673.quantity_qualifier.rb +869 -0
- data/lib/definitions/elements/generated/755.report_type_code.rb +559 -0
- data/lib/definitions/elements/generated/954.percent.rb +29 -0
- data/lib/definitions/elements/generated/963.tax_type_code.rb +111 -0
- data/lib/definitions/elements/manual/156.state_or_province_code.rb +16 -1
- data/lib/definitions/elements/manual/i/I10.interchange_control_standards_identifier.rb +2 -2
- data/lib/definitions/elements/manual/i/I11.interchange_control_version_number.rb +1 -0
- data/lib/definitions/segments/generated/amt.rb +56 -0
- data/lib/definitions/segments/generated/bia.rb +107 -0
- data/lib/definitions/segments/generated/cur.rb +73 -0
- data/lib/definitions/segments/generated/dtm.rb +17 -0
- data/lib/definitions/segments/generated/fob.rb +73 -0
- data/lib/definitions/segments/generated/hl.rb +90 -0
- data/lib/definitions/segments/generated/itd.rb +158 -0
- data/lib/definitions/segments/generated/mtx.rb +56 -0
- data/lib/definitions/segments/generated/n2.rb +56 -0
- data/lib/definitions/segments/generated/n9.rb +56 -0
- data/lib/definitions/segments/generated/per.rb +158 -0
- data/lib/definitions/segments/generated/po1.rb +102 -0
- data/lib/definitions/segments/generated/po3.rb +158 -0
- data/lib/definitions/segments/generated/qty.rb +73 -0
- data/lib/definitions/segments/generated/ref.rb +17 -0
- data/lib/definitions/segments/generated/sac.rb +68 -0
- data/lib/definitions/segments/generated/sch.rb +56 -0
- data/lib/definitions/segments/generated/sdq.rb +73 -0
- data/lib/definitions/segments/generated/txi.rb +90 -0
- data/lib/definitions/transaction_sets/manual/846/846.rb +122 -0
- data/lib/definitions/transaction_sets/manual/846/loops/lin.rb +155 -0
- data/lib/definitions/transaction_sets/manual/846/loops/n1.rb +107 -0
- data/lib/definitions/transaction_sets/manual/846/loops/qty.rb +75 -0
- data/lib/definitions/transaction_sets/manual/846/loops/sch.rb +59 -0
- data/lib/definitions/transaction_sets/manual/846/loops/sln.rb +59 -0
- data/lib/definitions/transaction_sets/manual/850/850.rb +108 -1
- data/lib/definitions/transaction_sets/manual/850/loops/ctp.rb +47 -0
- data/lib/definitions/transaction_sets/manual/850/loops/n1.rb +31 -10
- data/lib/definitions/transaction_sets/manual/850/loops/n9.rb +59 -0
- data/lib/definitions/transaction_sets/manual/850/loops/pid.rb +47 -0
- data/lib/definitions/transaction_sets/manual/850/loops/po1.rb +78 -10
- data/lib/definitions/transaction_sets/manual/850/loops/sac.rb +47 -0
- data/lib/eddy.rb +49 -3
- data/lib/eddy/build/transaction_set_builder.rb +1 -1
- data/lib/eddy/config.rb +0 -21
- data/lib/eddy/data.rb +0 -40
- data/lib/eddy/data/persistence/base.rb +5 -11
- data/lib/eddy/data/persistence/memory.rb +14 -22
- data/lib/eddy/errors.rb +13 -9
- data/lib/eddy/models/element/composite.rb +2 -0
- data/lib/eddy/models/element/id.rb +1 -1
- data/lib/eddy/models/element/r.rb +1 -0
- data/lib/eddy/models/functional_group.rb +3 -2
- data/lib/eddy/models/interchange.rb +5 -1
- data/lib/eddy/parse.rb +4 -56
- data/lib/eddy/parse/interchange.rb +58 -0
- data/lib/eddy/summary/loop.rb +1 -1
- data/lib/eddy/summary/segment.rb +2 -1
- data/lib/eddy/version.rb +1 -1
- metadata +78 -5
@@ -7,7 +7,7 @@ module Eddy
|
|
7
7
|
# - Id: 850
|
8
8
|
# - Name: Purchase Order
|
9
9
|
# - Functional Group: PO
|
10
|
-
class
|
10
|
+
class TS850 < Eddy::Models::TransactionSet
|
11
11
|
|
12
12
|
ID = "850".freeze
|
13
13
|
NAME = "Purchase Order".freeze
|
@@ -17,17 +17,35 @@ module Eddy
|
|
17
17
|
# @return [void]
|
18
18
|
def initialize(store)
|
19
19
|
@beg = Eddy::Segments::BEG.new(store)
|
20
|
+
@cur = Eddy::Segments::CUR.new(store)
|
21
|
+
@ref = Eddy::Segments::REF.new(store)
|
22
|
+
@fob = Eddy::Segments::FOB.new(store)
|
23
|
+
@l_sac = Eddy::TransactionSets::TS850::Loops::SAC::Base.new(store)
|
24
|
+
@itd = Eddy::Segments::ITD.new(store)
|
25
|
+
@dtm = Eddy::Segments::DTM.new(store)
|
20
26
|
@td5 = Eddy::Segments::TD5.new(store)
|
27
|
+
@txi = Eddy::Segments::TXI.new(store)
|
28
|
+
@l_n9 = Eddy::TransactionSets::TS850::Loops::N9::Base.new(store)
|
21
29
|
@l_n1 = Eddy::TransactionSets::TS850::Loops::N1::Base.new(store)
|
22
30
|
@l_po1 = Eddy::TransactionSets::TS850::Loops::PO1::Base.new(store)
|
23
31
|
@ctt = Eddy::Segments::CTT.new(store)
|
32
|
+
@amt = Eddy::Segments::AMT.new(store)
|
24
33
|
super(
|
25
34
|
store,
|
26
35
|
@beg,
|
36
|
+
@cur,
|
37
|
+
@ref,
|
38
|
+
@fob,
|
39
|
+
@l_sac,
|
40
|
+
@itd,
|
41
|
+
@dtm,
|
27
42
|
@td5,
|
43
|
+
@txi,
|
44
|
+
@l_n9,
|
28
45
|
@l_n1,
|
29
46
|
@l_po1,
|
30
47
|
@ctt,
|
48
|
+
@amt,
|
31
49
|
)
|
32
50
|
end
|
33
51
|
|
@@ -40,6 +58,64 @@ module Eddy
|
|
40
58
|
return @beg
|
41
59
|
end
|
42
60
|
|
61
|
+
# (see Eddy::Segments::CUR)
|
62
|
+
#
|
63
|
+
# @yieldparam [Eddy::Segments::CUR]
|
64
|
+
# @return [Eddy::Segments::CUR]
|
65
|
+
def CUR()
|
66
|
+
yield(@cur) if block_given?
|
67
|
+
return @cur
|
68
|
+
end
|
69
|
+
|
70
|
+
# (see Eddy::Segments::REF)
|
71
|
+
#
|
72
|
+
# @yieldparam [Eddy::Segments::REF]
|
73
|
+
# @return [Eddy::Segments::REF]
|
74
|
+
def REF()
|
75
|
+
yield(@ref) if block_given?
|
76
|
+
return @ref
|
77
|
+
end
|
78
|
+
|
79
|
+
# (see Eddy::Segments::FOB)
|
80
|
+
#
|
81
|
+
# @yieldparam [Eddy::Segments::FOB]
|
82
|
+
# @return [Eddy::Segments::FOB]
|
83
|
+
def FOB()
|
84
|
+
yield(@fob) if block_given?
|
85
|
+
return @fob
|
86
|
+
end
|
87
|
+
|
88
|
+
# (see Eddy::TransactionSets::TS850::Loops::SAC::Base)
|
89
|
+
#
|
90
|
+
# @yieldparam [Eddy::TransactionSets::TS850::Loops::SAC::Repeat]
|
91
|
+
# @return [void]
|
92
|
+
def L_SAC(&block)
|
93
|
+
if block_given?
|
94
|
+
@l_sac.repeat(&block)
|
95
|
+
else
|
96
|
+
raise Eddy::Errors::Error, "No block given in loop iteration"
|
97
|
+
end
|
98
|
+
return nil
|
99
|
+
end
|
100
|
+
|
101
|
+
# (see Eddy::Segments::ITD)
|
102
|
+
#
|
103
|
+
# @yieldparam [Eddy::Segments::ITD]
|
104
|
+
# @return [Eddy::Segments::ITD]
|
105
|
+
def ITD()
|
106
|
+
yield(@itd) if block_given?
|
107
|
+
return @itd
|
108
|
+
end
|
109
|
+
|
110
|
+
# (see Eddy::Segments::DTM)
|
111
|
+
#
|
112
|
+
# @yieldparam [Eddy::Segments::DTM]
|
113
|
+
# @return [Eddy::Segments::DTM]
|
114
|
+
def DTM()
|
115
|
+
yield(@dtm) if block_given?
|
116
|
+
return @dtm
|
117
|
+
end
|
118
|
+
|
43
119
|
# (see Eddy::Segments::TD5)
|
44
120
|
#
|
45
121
|
# @yieldparam [Eddy::Segments::TD5]
|
@@ -49,6 +125,28 @@ module Eddy
|
|
49
125
|
return @td5
|
50
126
|
end
|
51
127
|
|
128
|
+
# (see Eddy::Segments::TXI)
|
129
|
+
#
|
130
|
+
# @yieldparam [Eddy::Segments::TXI]
|
131
|
+
# @return [Eddy::Segments::TXI]
|
132
|
+
def TXI()
|
133
|
+
yield(@txi) if block_given?
|
134
|
+
return @txi
|
135
|
+
end
|
136
|
+
|
137
|
+
# (see Eddy::TransactionSets::TS850::Loops::N9::Base)
|
138
|
+
#
|
139
|
+
# @yieldparam [Eddy::TransactionSets::TS850::Loops::N9::Repeat]
|
140
|
+
# @return [void]
|
141
|
+
def L_N9(&block)
|
142
|
+
if block_given?
|
143
|
+
@l_n9.repeat(&block)
|
144
|
+
else
|
145
|
+
raise Eddy::Errors::Error, "No block given in loop iteration"
|
146
|
+
end
|
147
|
+
return nil
|
148
|
+
end
|
149
|
+
|
52
150
|
# (see Eddy::TransactionSets::TS850::Loops::N1::Base)
|
53
151
|
#
|
54
152
|
# @yieldparam [Eddy::TransactionSets::TS850::Loops::N1::Repeat]
|
@@ -84,6 +182,15 @@ module Eddy
|
|
84
182
|
return @ctt
|
85
183
|
end
|
86
184
|
|
185
|
+
# (see Eddy::Segments::AMT)
|
186
|
+
#
|
187
|
+
# @yieldparam [Eddy::Segments::AMT]
|
188
|
+
# @return [Eddy::Segments::AMT]
|
189
|
+
def AMT()
|
190
|
+
yield(@amt) if block_given?
|
191
|
+
return @amt
|
192
|
+
end
|
193
|
+
|
87
194
|
end
|
88
195
|
end
|
89
196
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Eddy
|
2
|
+
module TransactionSets
|
3
|
+
module TS850
|
4
|
+
module Loops
|
5
|
+
module CTP
|
6
|
+
|
7
|
+
# ### Loop Summary:
|
8
|
+
#
|
9
|
+
# - Repeat: 1
|
10
|
+
# - Components:
|
11
|
+
# - CTP
|
12
|
+
class Base < Eddy::Models::Loop::Base
|
13
|
+
# @param store [Eddy::Data::Store]
|
14
|
+
# @return [void]
|
15
|
+
def initialize(store)
|
16
|
+
@repeat_limit = 1
|
17
|
+
super(store, Repeat)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# (see Eddy::TransactionSets::TS850::Loops::CTP::Base)
|
22
|
+
class Repeat < Eddy::Models::Loop::Repeat
|
23
|
+
# @param store [Eddy::Data::Store]
|
24
|
+
# @return [void]
|
25
|
+
def initialize(store)
|
26
|
+
@ctp = Eddy::Segments::CTP.new(store)
|
27
|
+
super(
|
28
|
+
store,
|
29
|
+
@ctp,
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# (see Eddy::Segments::CTP)
|
34
|
+
#
|
35
|
+
# @yieldparam [Eddy::Segments::CTP]
|
36
|
+
# @return [Eddy::Segments::CTP]
|
37
|
+
def CTP()
|
38
|
+
yield(@ctp) if block_given?
|
39
|
+
return @ctp
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module Eddy
|
2
2
|
module TransactionSets
|
3
|
-
# Namespace for Transaction Set 850 and its loops.
|
4
3
|
module TS850
|
5
4
|
module Loops
|
6
5
|
module N1
|
@@ -10,33 +9,37 @@ module Eddy
|
|
10
9
|
# - Repeat: 200
|
11
10
|
# - Components:
|
12
11
|
# - N1
|
12
|
+
# - N2
|
13
13
|
# - N3
|
14
14
|
# - N4
|
15
|
+
# - PER
|
15
16
|
class Base < Eddy::Models::Loop::Base
|
16
17
|
# @param store [Eddy::Data::Store]
|
17
18
|
# @return [void]
|
18
19
|
def initialize(store)
|
19
|
-
super(store, Repeat)
|
20
20
|
@repeat_limit = 200
|
21
|
-
|
22
|
-
|
23
|
-
# @yieldparam [Eddy::TransactionSets::TS850::Loops::N1::Repeat]
|
24
|
-
# @return [void]
|
25
|
-
def repeat(&block)
|
26
|
-
super(&block)
|
21
|
+
super(store, Repeat)
|
27
22
|
end
|
28
23
|
end
|
29
24
|
|
30
25
|
# (see Eddy::TransactionSets::TS850::Loops::N1::Base)
|
31
26
|
class Repeat < Eddy::Models::Loop::Repeat
|
32
|
-
|
33
27
|
# @param store [Eddy::Data::Store]
|
34
28
|
# @return [void]
|
35
29
|
def initialize(store)
|
36
30
|
@n1 = Eddy::Segments::N1.new(store)
|
31
|
+
@n2 = Eddy::Segments::N2.new(store)
|
37
32
|
@n3 = Eddy::Segments::N3.new(store)
|
38
33
|
@n4 = Eddy::Segments::N4.new(store)
|
39
|
-
|
34
|
+
@per = Eddy::Segments::PER.new(store)
|
35
|
+
super(
|
36
|
+
store,
|
37
|
+
@n1,
|
38
|
+
@n2,
|
39
|
+
@n3,
|
40
|
+
@n4,
|
41
|
+
@per,
|
42
|
+
)
|
40
43
|
end
|
41
44
|
|
42
45
|
# (see Eddy::Segments::N1)
|
@@ -48,6 +51,15 @@ module Eddy
|
|
48
51
|
return @n1
|
49
52
|
end
|
50
53
|
|
54
|
+
# (see Eddy::Segments::N2)
|
55
|
+
#
|
56
|
+
# @yieldparam [Eddy::Segments::N2]
|
57
|
+
# @return [Eddy::Segments::N2]
|
58
|
+
def N2()
|
59
|
+
yield(@n2) if block_given?
|
60
|
+
return @n2
|
61
|
+
end
|
62
|
+
|
51
63
|
# (see Eddy::Segments::N3)
|
52
64
|
#
|
53
65
|
# @yieldparam [Eddy::Segments::N3]
|
@@ -65,6 +77,15 @@ module Eddy
|
|
65
77
|
yield(@n4) if block_given?
|
66
78
|
return @n4
|
67
79
|
end
|
80
|
+
|
81
|
+
# (see Eddy::Segments::PER)
|
82
|
+
#
|
83
|
+
# @yieldparam [Eddy::Segments::PER]
|
84
|
+
# @return [Eddy::Segments::PER]
|
85
|
+
def PER()
|
86
|
+
yield(@per) if block_given?
|
87
|
+
return @per
|
88
|
+
end
|
68
89
|
end
|
69
90
|
|
70
91
|
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Eddy
|
2
|
+
module TransactionSets
|
3
|
+
module TS850
|
4
|
+
module Loops
|
5
|
+
module N9
|
6
|
+
|
7
|
+
# ### Loop Summary:
|
8
|
+
#
|
9
|
+
# - Repeat: 1000
|
10
|
+
# - Components:
|
11
|
+
# - N9
|
12
|
+
# - MTX
|
13
|
+
class Base < Eddy::Models::Loop::Base
|
14
|
+
# @param store [Eddy::Data::Store]
|
15
|
+
# @return [void]
|
16
|
+
def initialize(store)
|
17
|
+
@repeat_limit = 1000
|
18
|
+
super(store, Repeat)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# (see Eddy::TransactionSets::TS850::Loops::N9::Base)
|
23
|
+
class Repeat < Eddy::Models::Loop::Repeat
|
24
|
+
# @param store [Eddy::Data::Store]
|
25
|
+
# @return [void]
|
26
|
+
def initialize(store)
|
27
|
+
@n9 = Eddy::Segments::N9.new(store)
|
28
|
+
@mtx = Eddy::Segments::MTX.new(store)
|
29
|
+
super(
|
30
|
+
store,
|
31
|
+
@n9,
|
32
|
+
@mtx,
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# (see Eddy::Segments::N9)
|
37
|
+
#
|
38
|
+
# @yieldparam [Eddy::Segments::N9]
|
39
|
+
# @return [Eddy::Segments::N9]
|
40
|
+
def N9()
|
41
|
+
yield(@n9) if block_given?
|
42
|
+
return @n9
|
43
|
+
end
|
44
|
+
|
45
|
+
# (see Eddy::Segments::MTX)
|
46
|
+
#
|
47
|
+
# @yieldparam [Eddy::Segments::MTX]
|
48
|
+
# @return [Eddy::Segments::MTX]
|
49
|
+
def MTX()
|
50
|
+
yield(@mtx) if block_given?
|
51
|
+
return @mtx
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Eddy
|
2
|
+
module TransactionSets
|
3
|
+
module TS850
|
4
|
+
module Loops
|
5
|
+
module PID
|
6
|
+
|
7
|
+
# ### Loop Summary:
|
8
|
+
#
|
9
|
+
# - Repeat: 1000
|
10
|
+
# - Components:
|
11
|
+
# - PID
|
12
|
+
class Base < Eddy::Models::Loop::Base
|
13
|
+
# @param store [Eddy::Data::Store]
|
14
|
+
# @return [void]
|
15
|
+
def initialize(store)
|
16
|
+
@repeat_limit = 1000
|
17
|
+
super(store, Repeat)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# (see Eddy::TransactionSets::TS850::Loops::PID::Base)
|
22
|
+
class Repeat < Eddy::Models::Loop::Repeat
|
23
|
+
# @param store [Eddy::Data::Store]
|
24
|
+
# @return [void]
|
25
|
+
def initialize(store)
|
26
|
+
@pid = Eddy::Segments::PID.new(store)
|
27
|
+
super(
|
28
|
+
store,
|
29
|
+
@pid,
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
# (see Eddy::Segments::PID)
|
34
|
+
#
|
35
|
+
# @yieldparam [Eddy::Segments::PID]
|
36
|
+
# @return [Eddy::Segments::PID]
|
37
|
+
def PID()
|
38
|
+
yield(@pid) if block_given?
|
39
|
+
return @pid
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1,28 +1,26 @@
|
|
1
1
|
module Eddy
|
2
2
|
module TransactionSets
|
3
|
-
# Namespace for Transaction Set 850 and its loops.
|
4
3
|
module TS850
|
5
4
|
module Loops
|
6
5
|
module PO1
|
7
6
|
|
8
7
|
# ### Loop Summary:
|
9
8
|
#
|
10
|
-
# - Repeat:
|
9
|
+
# - Repeat: 100000
|
11
10
|
# - Components:
|
12
11
|
# - PO1
|
12
|
+
# - CTP (loop)
|
13
|
+
# - PID (loop)
|
14
|
+
# - SAC (loop)
|
15
|
+
# - TXI
|
16
|
+
# - N9 (loop)
|
13
17
|
class Base < Eddy::Models::Loop::Base
|
14
18
|
# @param store [Eddy::Data::Store]
|
15
19
|
# @return [void]
|
16
20
|
def initialize(store)
|
17
|
-
@repeat_limit =
|
21
|
+
@repeat_limit = 100000
|
18
22
|
super(store, Repeat)
|
19
23
|
end
|
20
|
-
|
21
|
-
# @yieldparam [Eddy::TransactionSets::TS850::Loops::PO1::Repeat]
|
22
|
-
# @return [void]
|
23
|
-
def repeat(&block)
|
24
|
-
super(&block)
|
25
|
-
end
|
26
24
|
end
|
27
25
|
|
28
26
|
# (see Eddy::TransactionSets::TS850::Loops::PO1::Base)
|
@@ -31,7 +29,20 @@ module Eddy
|
|
31
29
|
# @return [void]
|
32
30
|
def initialize(store)
|
33
31
|
@po1 = Eddy::Segments::PO1.new(store)
|
34
|
-
|
32
|
+
@l_ctp = Eddy::TransactionSets::TS850::Loops::CTP::Base.new(store)
|
33
|
+
@l_pid = Eddy::TransactionSets::TS850::Loops::PID::Base.new(store)
|
34
|
+
@l_sac = Eddy::TransactionSets::TS850::Loops::SAC::Base.new(store)
|
35
|
+
@txi = Eddy::Segments::TXI.new(store)
|
36
|
+
@l_n9 = Eddy::TransactionSets::TS850::Loops::N9::Base.new(store)
|
37
|
+
super(
|
38
|
+
store,
|
39
|
+
@po1,
|
40
|
+
@l_ctp,
|
41
|
+
@l_pid,
|
42
|
+
@l_sac,
|
43
|
+
@txi,
|
44
|
+
@l_n9,
|
45
|
+
)
|
35
46
|
end
|
36
47
|
|
37
48
|
# (see Eddy::Segments::PO1)
|
@@ -42,6 +53,63 @@ module Eddy
|
|
42
53
|
yield(@po1) if block_given?
|
43
54
|
return @po1
|
44
55
|
end
|
56
|
+
|
57
|
+
# (see Eddy::Segments::CTP)
|
58
|
+
#
|
59
|
+
# @yieldparam [Eddy::Segments::CTP]
|
60
|
+
# @return [Eddy::Segments::CTP]
|
61
|
+
def CTP()
|
62
|
+
yield(@ctp) if block_given?
|
63
|
+
return @ctp
|
64
|
+
end
|
65
|
+
|
66
|
+
# (see Eddy::TransactionSets::TS850::Loops::PID::Base)
|
67
|
+
#
|
68
|
+
# @yieldparam [Eddy::TransactionSets::TS850::Loops::PID::Repeat]
|
69
|
+
# @return [void]
|
70
|
+
def L_PID(&block)
|
71
|
+
if block_given?
|
72
|
+
@l_pid.repeat(&block)
|
73
|
+
else
|
74
|
+
raise Eddy::Errors::Error, "No block given in loop iteration"
|
75
|
+
end
|
76
|
+
return nil
|
77
|
+
end
|
78
|
+
|
79
|
+
# (see Eddy::TransactionSets::TS850::Loops::SAC::Base)
|
80
|
+
#
|
81
|
+
# @yieldparam [Eddy::TransactionSets::TS850::Loops::SAC::Repeat]
|
82
|
+
# @return [void]
|
83
|
+
def L_SAC(&block)
|
84
|
+
if block_given?
|
85
|
+
@l_sac.repeat(&block)
|
86
|
+
else
|
87
|
+
raise Eddy::Errors::Error, "No block given in loop iteration"
|
88
|
+
end
|
89
|
+
return nil
|
90
|
+
end
|
91
|
+
|
92
|
+
# (see Eddy::Segments::TXI)
|
93
|
+
#
|
94
|
+
# @yieldparam [Eddy::Segments::TXI]
|
95
|
+
# @return [Eddy::Segments::TXI]
|
96
|
+
def TXI()
|
97
|
+
yield(@txi) if block_given?
|
98
|
+
return @txi
|
99
|
+
end
|
100
|
+
|
101
|
+
# (see Eddy::TransactionSets::TS850::Loops::N9::Base)
|
102
|
+
#
|
103
|
+
# @yieldparam [Eddy::TransactionSets::TS850::Loops::N9::Repeat]
|
104
|
+
# @return [void]
|
105
|
+
def L_N9(&block)
|
106
|
+
if block_given?
|
107
|
+
@l_n9.repeat(&block)
|
108
|
+
else
|
109
|
+
raise Eddy::Errors::Error, "No block given in loop iteration"
|
110
|
+
end
|
111
|
+
return nil
|
112
|
+
end
|
45
113
|
end
|
46
114
|
|
47
115
|
end
|