Class: Tap::App::Stack

Inherits:
Object
  • Object
show all
Defined in:
lib/tap/app/stack.rb

Overview

The base of the application call stack.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Stack

Returns a new instance of Stack.



10
11
12
# File 'lib/tap/app/stack.rb', line 10

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

The application using this stack.



8
9
10
# File 'lib/tap/app/stack.rb', line 8

def app
  @app
end

Instance Method Details

#call(task, input) ⇒ Object

Checks app for termination and then calls the task with the input:

task.call(input)


18
19
20
21
# File 'lib/tap/app/stack.rb', line 18

def call(task, input)
  app.check_terminate
  task.call(input)
end