Class: AmazingActivist::Success
- Inherits:
-
Literal::Data
- Object
- Literal::Data
- AmazingActivist::Success
show all
- Includes:
- Outcome
- Defined in:
- lib/amazing_activist/success.rb
Constant Summary
Constants included
from Outcome
Outcome::Failure, Outcome::Success
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Outcome
#inspect, #unwrap!, #value_or
Instance Attribute Details
13
|
# File 'lib/amazing_activist/success.rb', line 13
prop :activity, AmazingActivist::Base
|
9
|
# File 'lib/amazing_activist/success.rb', line 9
prop :value, _Any?, :positional
|
Instance Method Details
#deconstruct ⇒ Array
20
21
22
|
# File 'lib/amazing_activist/success.rb', line 20
def deconstruct
[:success, value, activity]
end
|
#deconstruct_keys(_) ⇒ Hash
26
27
28
|
# File 'lib/amazing_activist/success.rb', line 26
def deconstruct_keys(_)
{ success: value, activity: }
end
|
#failure? ⇒ Boolean
15
|
# File 'lib/amazing_activist/success.rb', line 15
def failure? = false
|
#success? ⇒ Boolean
16
|
# File 'lib/amazing_activist/success.rb', line 16
def success? = true
|