Skip to content

Commit

Permalink
Check in manually written changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tcd committed Jan 7, 2020
1 parent 9ab800f commit c4f6527
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 379 deletions.
48 changes: 36 additions & 12 deletions lib/definitions/transaction_sets/manual/810/810.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class TS810 < Eddy::Models::TransactionSet
def initialize(store)
@big = Eddy::Segments::BIG.new(store)
@ref = Eddy::Segments::REF.new(store)
@l_n1 = Eddy::TransactionSets::TS810::Loops::N1.new(store)
@l_n1 = Eddy::TransactionSets::TS810::Loops::N1::Base.new(store)
@dtm = Eddy::Segments::DTM.new(store)
@l_it1 = Eddy::TransactionSets::TS810::Loops::IT1.new(store)
@l_it1 = Eddy::TransactionSets::TS810::Loops::IT1::Base.new(store)
@tds = Eddy::Segments::TDS.new(store)
@cad = Eddy::Segments::CAD.new(store)
@l_sac = Eddy::TransactionSets::TS810::Loops::SAC.new(store)
@l_sac = Eddy::TransactionSets::TS810::Loops::SAC::Base.new(store)
@ctt = Eddy::Segments::CTT.new(store)
super(
store,
Expand Down Expand Up @@ -57,9 +57,17 @@ def REF()
return @ref
end

# @return [Eddy::TransactionSets::TS810::Loops::N1]
def L_N1()
return @l_n1
# (see Eddy::TransactionSets::TS810::Loops::IT1::Base)
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::N1::Repeat] n1
# @return [void]
def L_N1(&block)
if block_given?
@l_n1.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end

# (see Eddy::Segments::DTM)
Expand All @@ -71,9 +79,17 @@ def DTM()
return @dtm
end

# @return [Eddy::TransactionSets::TS810::Loops::IT1]
def L_IT1()
return @l_it1
# (see Eddy::TransactionSets::TS810::Loops::IT1::Base)
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::IT1::Repeat] it1
# @return [void]
def L_IT1(&block)
if block_given?
@l_it1.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end

# (see Eddy::Segments::TDS)
Expand All @@ -94,9 +110,17 @@ def CAD()
return @cad
end

# @return [Eddy::TransactionSets::TS810::Loops::SAC]
def L_SAC()
return @l_sac
# (see Eddy::TransactionSets::TS810::Loops::SAC::Base)
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::SAC::Repeat] sac
# @return [void]
def L_SAC(&block)
if block_given?
@l_sac.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end

# (see Eddy::Segments::CTT)
Expand Down
157 changes: 80 additions & 77 deletions lib/definitions/transaction_sets/manual/810/loops/it1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,94 +3,97 @@ module TransactionSets
# Namespace for Transaction Set 810 and its loops.
module TS810
module Loops
module IT1

# ### Loop Summary:
#
# - Repeat: 200,000
# - Components:
# - IT1
# - CTP
# - PID (Loop)
# - SAC (loop)
class IT1 < Eddy::Models::Loop::Base
# @param store [Eddy::Data::Store]
# @return [void]
def initialize(store)
super(store, IT1_Repeat)
@repeat_limit = 200_000
end

# Add a repeat of loop IT1
# ### Loop Summary:
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::IT1_Repeat] rep
# @return [void]
def repeat(&block)
super(&block)
end
end
# - Repeat: 200,000
# - Components:
# - IT1
# - CTP
# - PID (loop)
# - SAC (loop)
class Base < Eddy::Models::Loop::Base
# @param store [Eddy::Data::Store]
# @return [void]
def initialize(store)
super(store, Repeat)
@repeat_limit = 200_000
end

# ### Loop Summary:
#
# - Repeat: 100,000
# - Components:
# - IT1
class IT1_Repeat < Eddy::Models::Loop::Repeat
# @param store [Eddy::Data::Store]
# @return [void]
def initialize(store)
@it1 = Eddy::Segments::IT1.new(store)
@ctp = Eddy::Segments::CTP.new(store)
@l_pid = Eddy::TransactionSets::TS810::Loops::PID.new(store)
@l_sac = Eddy::TransactionSets::TS810::Loops::SAC.new(store)
super(
store,
@it1,
@ctp,
@l_pid,
@l_sac,
)
# Add a repeat of loop IT1
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::IT1::Repeat] rep
# @return [void]
def repeat(&block)
super(&block)
end
end

# Add a repeat of loop IT1.
#
# @yieldparam [Eddy::Segments::IT1] it1
# @yieldparam [Eddy::Segments::CTP] ctp
# @yieldparam [Eddy::TransactionSets::TS810::Loops::PID] l_pid
# @yieldparam [Eddy::TransactionSets::TS810::Loops::SAC] l_sac
# @return [void]
def repeat(&block)
super(&block)
end
# (see Eddy::TransactionSets::TS810::Loops::IT1::Base)
class Repeat < Eddy::Models::Loop::Repeat
# @param store [Eddy::Data::Store]
# @return [void]
def initialize(store)
@it1 = Eddy::Segments::IT1.new(store)
@ctp = Eddy::Segments::CTP.new(store)
@l_pid = Eddy::TransactionSets::TS810::Loops::PID::Base.new(store)
@l_sac = Eddy::TransactionSets::TS810::Loops::SAC::Base.new(store)
super(
store,
@it1,
@ctp,
@l_pid,
@l_sac,
)
end

# (see Eddy::Segments::IT1)
#
# @yieldparam [Eddy::Segments::IT1] it1
# @return [Eddy::Segments::IT1]
def IT1()
yield(@it1) if block_given?
return @it1
end
# (see Eddy::Segments::IT1)
#
# @yieldparam [Eddy::Segments::IT1] it1
# @return [Eddy::Segments::IT1]
def IT1()
yield(@it1) if block_given?
return @it1
end

# (see Eddy::Segments::CTP)
#
# @yieldparam [Eddy::Segments::CTP] ctp
# @return [Eddy::Segments::CTP]
def CTP()
yield(@ctp) if block_given?
return @ctp
end
# (see Eddy::Segments::CTP)
#
# @yieldparam [Eddy::Segments::CTP] ctp
# @return [Eddy::Segments::CTP]
def CTP()
yield(@ctp) if block_given?
return @ctp
end

# @return [Eddy::TransactionSets::TS810::Loops::PID]
def L_PID()
return @l_pid
end
# (see Eddy::TransactionSets::TS810::Loops::PID::Repeat)
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::PID::Repeat]
# @return [void]
def L_PID(&block)
if block_given?
@l_pid.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end

# @return [Eddy::TransactionSets::TS810::Loops::SAC]
def L_SAC()
return @l_sac
# (see Eddy::TransactionSets::TS810::Loops::SAC::Repeat)
#
# @yieldparam [Eddy::TransactionSets::TS810::Loops::SAC::Repeat]
# @return [void]
def L_SAC(&block)
if block_given?
@l_sac.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end
end
end

end
end
end
end
Expand Down
Loading

0 comments on commit c4f6527

Please sign in to comment.