Module: Trailblazer::Operation::Railway

Defined in:
lib/trailblazer/operation/railway.rb

Overview

End event: All subclasses of End:::Success are interpreted as “success”.

Defined Under Namespace

Modules: End Classes: Result

Class Method Summary collapse

Class Method Details

.fail!Object



8
# File 'lib/trailblazer/operation/railway.rb', line 8

def self.fail!     ; Activity::Left  end

.fail_fast!Object



10
# File 'lib/trailblazer/operation/railway.rb', line 10

def self.fail_fast!; Activity::FastTrack::FailFast end

.pass!Object



9
# File 'lib/trailblazer/operation/railway.rb', line 9

def self.pass!     ; Activity::Right end

.pass_fast!Object



11
# File 'lib/trailblazer/operation/railway.rb', line 11

def self.pass_fast!; Activity::FastTrack::PassFast end

.Result(end_event, options) ⇒ Object

Parameters:

  • options

    Context

  • end_event

    The last emitted signal in a circuit is usually the end event.



14
15
16
# File 'lib/trailblazer/operation/railway.rb', line 14

def self.Result(end_event, options, *)
  Result.new(end_event.kind_of?(End::Success), options, end_event)
end