Class: QuartzTorrent::PieceManager::Result
- Inherits:
-
Object
- Object
- QuartzTorrent::PieceManager::Result
- Defined in:
- lib/quartz_torrent/filemanager.rb
Overview
The result of an asynchronous operation preformed by the PieceManager.
Instance Attribute Summary collapse
-
#data ⇒ Object
Any data returned in the result.
-
#error ⇒ Object
The error message if the operation was not successful.
-
#requestId ⇒ Object
The ID of the request that this result is for.
Instance Method Summary collapse
-
#initialize(requestId, success, data, error = nil) ⇒ Result
constructor
A new instance of Result.
-
#successful? ⇒ Boolean
Returns true if the operation was succesful.
Constructor Details
#initialize(requestId, success, data, error = nil) ⇒ Result
Returns a new instance of Result.
261 262 263 264 265 266 |
# File 'lib/quartz_torrent/filemanager.rb', line 261 def initialize(requestId, success, data, error = nil) @success = success @error = error @data = data @requestId = requestId end |
Instance Attribute Details
#data ⇒ Object
Any data returned in the result
276 277 278 |
# File 'lib/quartz_torrent/filemanager.rb', line 276 def data @data end |
#error ⇒ Object
The error message if the operation was not successful
273 274 275 |
# File 'lib/quartz_torrent/filemanager.rb', line 273 def error @error end |
#requestId ⇒ Object
The ID of the request that this result is for. This is the same as the id returned when making the request.
270 271 272 |
# File 'lib/quartz_torrent/filemanager.rb', line 270 def requestId @requestId end |
Instance Method Details
#successful? ⇒ Boolean
Returns true if the operation was succesful
279 280 281 |
# File 'lib/quartz_torrent/filemanager.rb', line 279 def successful? @success end |