Class: SmartCore::Operation::Result::Success
- Inherits:
-
Basic
- Object
- Basic
- SmartCore::Operation::Result::Success
show all
- Defined in:
- lib/smart_core/operation/result/success.rb
Overview
Instance Method Summary
collapse
Methods inherited from Basic
#callback?, #failure?, #fatal?
Constructor Details
#initialize(**result_options) ⇒ void
11
12
13
14
15
|
# File 'lib/smart_core/operation/result/success.rb', line 11
def initialize(**result_options)
__prevent_core_methods_overlapping__(result_options)
super(result_options)
__define_virtual_acessors__(result_options)
end
|
Instance Method Details
#success? {|SmartCore::Operation::Result::Success| ... } ⇒ Boolean
22
23
24
|
# File 'lib/smart_core/operation/result/success.rb', line 22
def success?
true.tap { yield(self) if block_given? }
end
|
#to_h ⇒ Hash<Symbol,Any>
Also known as:
to_hash
30
31
32
|
# File 'lib/smart_core/operation/result/success.rb', line 30
def to_h
__result_options__.dup
end
|