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