Class: Async::Container::Thread::Status
- Inherits:
-
Object
- Object
- Async::Container::Thread::Status
- Defined in:
- lib/async/container/thread.rb
Instance Method Summary collapse
-
#initialize(result = nil) ⇒ Status
constructor
A new instance of Status.
- #success? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(result = nil) ⇒ Status
Returns a new instance of Status.
156 157 158 |
# File 'lib/async/container/thread.rb', line 156 def initialize(result = nil) @result = result end |
Instance Method Details
#success? ⇒ Boolean
160 161 162 |
# File 'lib/async/container/thread.rb', line 160 def success? @result.nil? end |
#to_s ⇒ Object
164 165 166 |
# File 'lib/async/container/thread.rb', line 164 def to_s "\#<#{self.class} #{success? ? "success" : "failure"}>" end |