Sha256: c77cf6c7492ad224aa5baadea61f46324da67f17bb53c4a3fb4c28dbf868e9cc

Contents?: true

Size: 1.92 KB

Versions: 7

Compression:

Stored size: 1.92 KB

Contents

module Eddy
  module TransactionSets
    # Namespace for Transaction Set 850 and its loops.
    module TS850
      module Loops
        module N1

          # ### Loop Summary:
          #
          # - Repeat: 200
          # - Components:
          #   - N1
          #   - N3
          #   - N4
          class Base < Eddy::Models::Loop::Base
            # @param store [Eddy::Data::Store]
            # @return [void]
            def initialize(store)
              super(store, Repeat)
              @repeat_limit = 200
            end

            # @yieldparam [Eddy::TransactionSets::TS850::Loops::N1::Repeat]
            # @return [void]
            def repeat(&block)
              super(&block)
            end
          end

          # (see Eddy::TransactionSets::TS850::Loops::N1::Base)
          class Repeat < Eddy::Models::Loop::Repeat

            # @param store [Eddy::Data::Store]
            # @return [void]
            def initialize(store)
              @n1 = Eddy::Segments::N1.new(store)
              @n3 = Eddy::Segments::N3.new(store)
              @n4 = Eddy::Segments::N4.new(store)
              super(store, @n1, @n3, @n4)
            end

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

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

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

        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eddy-0.8.4 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.8.3 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.8.2 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.8.1 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.8.0 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.7.0 lib/definitions/transaction_sets/manual/850/loops/n1.rb
eddy-0.6.0 lib/definitions/transaction_sets/manual/850/loops/n1.rb