Class: Micro::Case::Safe

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

Direct Known Subclasses

Micro::Case::Strict::Safe

Constant Summary

Constants inherited from Micro::Case

InspectKey, VERSION

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Micro::Case

__call__, __call__!, __flow_get__, __flow_set__!, __new__, #__set_result__, auto_validation_disabled?, call, call!, #call!, config, disable_auto_validation, flow, inherited, #initialize, inspect, then, to_proc, use_cases

Constructor Details

This class inherits a constructor from Micro::Case

Class Method Details

.__flow_builder__Object



6
7
8
# File 'lib/micro/case/safe.rb', line 6

def self.__flow_builder__
  Cases::Safe::Flow
end

Instance Method Details

#__call__Object



10
11
12
13
14
15
16
# File 'lib/micro/case/safe.rb', line 10

def __call__
  __call_the_use_case_or_its_flow
rescue => exception
  raise exception if Error.by_wrong_usage?(exception)

  Failure(result: exception)
end