Class: Dynflow::Middleware

Inherits:
Object
  • Object
show all
Includes:
Algebrick::TypeCheck
Defined in:
lib/dynflow/middleware.rb

Direct Known Subclasses

Action::Progress::Calculate

Defined Under Namespace

Classes: Register, Resolver, Stack, World

Instance Method Summary collapse

Constructor Details

#initialize(stack) ⇒ Middleware

Returns a new instance of Middleware.



10
11
12
# File 'lib/dynflow/middleware.rb', line 10

def initialize(stack)
  @stack = Type! stack, Stack
end

Instance Method Details

#actionObject

to get the action object



20
21
22
# File 'lib/dynflow/middleware.rb', line 20

def action
  @stack.action or raise "the action is not available"
end

#finalize(*args) ⇒ Object



32
33
34
# File 'lib/dynflow/middleware.rb', line 32

def finalize(*args)
  pass(*args)
end

#finalize_phase(*args) ⇒ Object



40
41
42
# File 'lib/dynflow/middleware.rb', line 40

def finalize_phase(*args)
  pass(*args)
end

#pass(*args) ⇒ Object

call ‘pass` to get deeper with the call



15
16
17
# File 'lib/dynflow/middleware.rb', line 15

def pass(*args)
  @stack.pass(*args)
end

#plan(*args) ⇒ Object



28
29
30
# File 'lib/dynflow/middleware.rb', line 28

def plan(*args)
  pass(*args)
end

#plan_phase(*args) ⇒ Object



36
37
38
# File 'lib/dynflow/middleware.rb', line 36

def plan_phase(*args)
  pass(*args)
end

#run(*args) ⇒ Object



24
25
26
# File 'lib/dynflow/middleware.rb', line 24

def run(*args)
  pass(*args)
end