Class: C3D::Blobber
- Inherits:
-
Object
- Object
- C3D::Blobber
- Includes:
- Celluloid
- Defined in:
- lib/c3d/util/blobber.rb
Instance Attribute Summary collapse
-
#blob_file ⇒ Object
Returns the value of attribute blob_file.
-
#btih ⇒ Object
Returns the value of attribute btih.
-
#mag_link ⇒ Object
Returns the value of attribute mag_link.
-
#sha1_trun ⇒ Object
Returns the value of attribute sha1_trun.
-
#tor_file ⇒ Object
Returns the value of attribute tor_file.
Instance Method Summary collapse
-
#initialize(blob) ⇒ Blobber
constructor
A new instance of Blobber.
Constructor Details
#initialize(blob) ⇒ Blobber
Returns a new instance of Blobber.
10 11 12 13 14 15 16 17 18 |
# File 'lib/c3d/util/blobber.rb', line 10 def initialize blob @piecelength = 32 * 1024 if blob prepare blob build write_torrent publish_torrent end end |
Instance Attribute Details
#blob_file ⇒ Object
Returns the value of attribute blob_file.
8 9 10 |
# File 'lib/c3d/util/blobber.rb', line 8 def blob_file @blob_file end |
#btih ⇒ Object
Returns the value of attribute btih.
8 9 10 |
# File 'lib/c3d/util/blobber.rb', line 8 def btih @btih end |
#mag_link ⇒ Object
Returns the value of attribute mag_link.
8 9 10 |
# File 'lib/c3d/util/blobber.rb', line 8 def mag_link @mag_link end |
#sha1_trun ⇒ Object
Returns the value of attribute sha1_trun.
8 9 10 |
# File 'lib/c3d/util/blobber.rb', line 8 def sha1_trun @sha1_trun end |
#tor_file ⇒ Object
Returns the value of attribute tor_file.
8 9 10 |
# File 'lib/c3d/util/blobber.rb', line 8 def tor_file @tor_file end |