Sha256: 74f2815c2dbd8e71f3a8abd05428213adc41f2688bf4018ffba892b9c26a5cbf

Contents?: true

Size: 463 Bytes

Versions: 3

Compression:

Stored size: 463 Bytes

Contents

module Tap
  class App
    
    # The base of the application call stack.
    class Stack
      
      # The application using this stack.
      attr_reader :app
      
      def initialize(app)
        @app = app
      end
      
      # Checks app for termination and then calls the node with the inputs:
      #
      #   node.call(*inputs)
      #
      def call(node, inputs)
        app.check_terminate
        node.call(*inputs)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tap-0.19.0 lib/tap/app/stack.rb
tap-0.18.0 lib/tap/app/stack.rb
tap-0.17.1 lib/tap/app/stack.rb