Class: Minitest::Distributed::EnqueuedRunnable::Result::Commit
- Inherits:
-
Object
- Object
- Minitest::Distributed::EnqueuedRunnable::Result::Commit
- Extended by:
- T::Sig
- Defined in:
- lib/minitest/distributed/enqueued_runnable.rb
Class Method Summary collapse
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(&block) ⇒ Commit
constructor
A new instance of Commit.
- #success? ⇒ Boolean
Constructor Details
#initialize(&block) ⇒ Commit
Returns a new instance of Commit.
58 59 60 |
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 58 def initialize(&block) @block = block end |
Class Method Details
.failure ⇒ Object
78 79 80 |
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 78 def self.failure @failure ||= T.let(new { false }, T.nilable(Commit)) end |
.success ⇒ Object
73 74 75 |
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 73 def self.success @success ||= T.let(new { true }, T.nilable(Commit)) end |
Instance Method Details
#failure? ⇒ Boolean
68 69 70 |
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 68 def failure? !success? end |
#success? ⇒ Boolean
63 64 65 |
# File 'lib/minitest/distributed/enqueued_runnable.rb', line 63 def success? @success ||= T.let(@block.call, T.nilable(T::Boolean)) end |