Class: Pedophile::Downloader

Inherits:
Object
  • Object
show all
Defined in:
lib/pedophile/downloader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDownloader

Returns a new instance of Downloader.



5
6
7
8
9
10
# File 'lib/pedophile/downloader.rb', line 5

def initialize
  @login = Login.new(self)
  @wget = Wget.new(self)
  @offline_tree = OfflineTree.new(self)
  @big_files = BigFiles.new(self)
end

Instance Attribute Details

#big_filesObject (readonly)

Returns the value of attribute big_files.



12
13
14
# File 'lib/pedophile/downloader.rb', line 12

def big_files
  @big_files
end

#loginObject (readonly)

Returns the value of attribute login.



12
13
14
# File 'lib/pedophile/downloader.rb', line 12

def 
  @login
end

#offline_treeObject (readonly)

Returns the value of attribute offline_tree.



12
13
14
# File 'lib/pedophile/downloader.rb', line 12

def offline_tree
  @offline_tree
end

#urlObject

Returns the value of attribute url.



13
14
15
# File 'lib/pedophile/downloader.rb', line 13

def url
  @url
end

#wgetObject (readonly)

Returns the value of attribute wget.



12
13
14
# File 'lib/pedophile/downloader.rb', line 12

def wget
  @wget
end

Instance Method Details

#make_it_soObject



15
16
17
18
# File 'lib/pedophile/downloader.rb', line 15

def make_it_so
  wget.mirror
  offline_tree.make_it_so
end

#zip(name = "site.zip") ⇒ Object



20
21
22
# File 'lib/pedophile/downloader.rb', line 20

def zip(name = "site.zip")
  offline_tree.zip(name)
end

#zip_with_custom_dir(output_path_zip, output_directory_name) ⇒ Object



24
25
26
# File 'lib/pedophile/downloader.rb', line 24

def zip_with_custom_dir(output_path_zip, output_directory_name)
  offline_tree.zip_with_custom_dir(output_path_zip, output_directory_name)
end