Class: Micro::Case::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, #initialize, inspect, then, to_proc, use_cases
Constructor Details
This class inherits a constructor from Micro::Case
Class Method Details
.__flow_builder__ ⇒ Object
14
15
16
|
# File 'lib/micro/case/safe.rb', line 14
def self.__flow_builder__
Cases::Safe::Flow
end
|
.inherited(subclass) ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/micro/case/safe.rb', line 6
def self.inherited(subclass)
if Config.instance.disable_safe_features
raise Error::SafeFeaturesDisabled.new('Micro::Case::Safe')
end
super
end
|
Instance Method Details
#__call__ ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/micro/case/safe.rb', line 18
def __call__
__call_the_use_case_or_its_flow
rescue => exception
raise exception if Error.by_wrong_usage?(exception)
Failure(result: exception)
end
|