Class: QuartzTorrent::FileRegion
- Inherits:
-
Object
- Object
- QuartzTorrent::FileRegion
- Defined in:
- lib/quartz_torrent/filemanager.rb
Overview
Represents a unique region of a file: a filename, offset, and length.
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path = nil, offset = nil, length = nil) ⇒ FileRegion
constructor
A new instance of FileRegion.
Constructor Details
#initialize(path = nil, offset = nil, length = nil) ⇒ FileRegion
Returns a new instance of FileRegion.
33 34 35 36 37 |
# File 'lib/quartz_torrent/filemanager.rb', line 33 def initialize(path = nil, offset = nil, length = nil) @path = path @offset = offset @length = length end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
41 42 43 |
# File 'lib/quartz_torrent/filemanager.rb', line 41 def length @length end |
#offset ⇒ Object
Returns the value of attribute offset.
40 41 42 |
# File 'lib/quartz_torrent/filemanager.rb', line 40 def offset @offset end |
#path ⇒ Object
Returns the value of attribute path.
39 40 41 |
# File 'lib/quartz_torrent/filemanager.rb', line 39 def path @path end |