Class: C3D::Blobber

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/c3d/util/blobber.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_fileObject

Returns the value of attribute blob_file.



8
9
10
# File 'lib/c3d/util/blobber.rb', line 8

def blob_file
  @blob_file
end

#btihObject

Returns the value of attribute btih.



8
9
10
# File 'lib/c3d/util/blobber.rb', line 8

def btih
  @btih
end

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_trunObject

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_fileObject

Returns the value of attribute tor_file.



8
9
10
# File 'lib/c3d/util/blobber.rb', line 8

def tor_file
  @tor_file
end