Class: Micro::Case::Safe

Inherits:
Micro::Case show all
Defined in:
lib/micro/case/safe.rb,
lib/micro/case/safe/flow.rb

Direct Known Subclasses

Micro::Case::Strict::Safe

Defined Under Namespace

Modules: Flow

Constant Summary

Constants inherited from Micro::Case

VERSION

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Micro::Case

&, >>, __call!, __call_and_set_transition__, __flow_get, __flow_set!, __new__, #__set_result__, auto_validation_disabled?, call, call!, #call!, disable_auto_validation, flow, inherited, #initialize, to_proc, use_cases

Constructor Details

This class inherits a constructor from Micro::Case

Class Method Details

.__flow_reducerObject



39
40
41
# File 'lib/micro/case/safe/flow.rb', line 39

def self.__flow_reducer
  Flow::Reducer
end

.Flow(args) ⇒ Object



35
36
37
# File 'lib/micro/case/safe/flow.rb', line 35

def self.Flow(args)
  Flow::Reducer.build(Array(args))
end

Instance Method Details

#callObject



6
7
8
9
10
11
12
# File 'lib/micro/case/safe.rb', line 6

def call
  __call
rescue => exception
  raise exception if Error::ByWrongUsage.check(exception)

  Failure(exception)
end