Class: Trailblazer::Circuit::End

Inherits:
Object
  • Object
show all
Defined in:
lib/trailblazer/circuit.rb

Overview

End event is just another callable task. Any instance of subclass of End will halt the circuit’s execution when hit.

Direct Known Subclasses

Start, Wrap::End

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ End

Returns a new instance of End.



77
78
79
80
# File 'lib/trailblazer/circuit.rb', line 77

def initialize(name, options={})
  @name    = name
  @options = options
end

Instance Method Details

#call(direction, *args) ⇒ Object



82
83
84
# File 'lib/trailblazer/circuit.rb', line 82

def call(direction, *args)
  [ self, *args ]
end