Sha256: 87aa8c84692e4262179f7b45422377a56ea0e63fa5bd93415d5102bafe25961b

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 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 task with the input:
      #
      #   task.call(input)
      #
      def call(task, input)
        app.check_terminate
        task.call(input)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tap-1.4.0 lib/tap/app/stack.rb
tap-1.3.0 lib/tap/app/stack.rb