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.
157 158 159 |
# File 'lib/async/container/thread.rb', line 157 def initialize(result = nil) @result = result end |
Instance Method Details
#success? ⇒ Boolean
161 162 163 |
# File 'lib/async/container/thread.rb', line 161 def success? @result.nil? end |
#to_s ⇒ Object
165 166 167 |
# File 'lib/async/container/thread.rb', line 165 def to_s "\#<#{self.class} #{success? ? "success" : "failure"}>" end |