Class: SmartCore::Operation::Success
- Inherits:
-
Result
- Object
- Result
- SmartCore::Operation::Success
show all
- Defined in:
- lib/smart_core/operation/success.rb
Overview
Instance Attribute Summary
Attributes inherited from Result
#__result_attributes__, #__result_options__
Instance Method Summary
collapse
Methods inherited from Result
#failure?
Constructor Details
#initialize(**result_options) ⇒ void
11
12
13
14
15
|
# File 'lib/smart_core/operation/success.rb', line 11
def initialize(**result_options)
__prevent_method_overlapping__(result_options)
super(**result_options) __define_virtual_result_data_accessors__(result_options)
end
|
Instance Method Details
#success? {|nil| ... } ⇒ Boolean
22
23
24
|
# File 'lib/smart_core/operation/success.rb', line 22
def success?
true.tap { yield(self) if block_given? }
end
|