Class: QuartzTorrent::Metainfo::FileInfo
- Inherits:
-
Object
- Object
- QuartzTorrent::Metainfo::FileInfo
- Defined in:
- lib/quartz_flow/mock_client.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Length of the file.
-
#path ⇒ Object
Relative path to the file.
Instance Method Summary collapse
-
#initialize(length = nil, path = nil) ⇒ FileInfo
constructor
A new instance of FileInfo.
Constructor Details
#initialize(length = nil, path = nil) ⇒ FileInfo
31 32 33 34 |
# File 'lib/quartz_flow/mock_client.rb', line 31 def initialize(length = nil, path = nil) @length = length @path = path end |
Instance Attribute Details
#length ⇒ Object
Length of the file.
40 41 42 |
# File 'lib/quartz_flow/mock_client.rb', line 40 def length @length end |
#path ⇒ Object
Relative path to the file. For a single-file torrent this is simply the name of the file. For a multi-file torrent, this is the directory names from the torrent and the filename separated by the file separator.
38 39 40 |
# File 'lib/quartz_flow/mock_client.rb', line 38 def path @path end |