Class: RungerActions::Result
- Inherits:
-
Object
- Object
- RungerActions::Result
- Defined in:
- lib/runger_actions/result.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#return_values ⇒ Object
readonly
Returns the value of attribute return_values.
Instance Method Summary collapse
-
#initialize(action:) ⇒ Result
constructor
A new instance of Result.
- #lock! ⇒ Object
- #locked? ⇒ Boolean
- #success? ⇒ Boolean
Constructor Details
#initialize(action:) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 |
# File 'lib/runger_actions/result.rb', line 6 def initialize(action:) @action = action @return_values = {} @failure = nil end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
4 5 6 |
# File 'lib/runger_actions/result.rb', line 4 def @error_message end |
#return_values ⇒ Object (readonly)
Returns the value of attribute return_values.
4 5 6 |
# File 'lib/runger_actions/result.rb', line 4 def return_values @return_values end |
Instance Method Details
#lock! ⇒ Object
12 13 14 |
# File 'lib/runger_actions/result.rb', line 12 def lock! @locked = true end |
#locked? ⇒ Boolean
16 17 18 |
# File 'lib/runger_actions/result.rb', line 16 def locked? @locked == true end |
#success? ⇒ Boolean
20 21 22 |
# File 'lib/runger_actions/result.rb', line 20 def success? @failure.nil? end |