Class: Rosi

Inherits:
Object
  • Object
show all
Defined in:
lib/irosi/download.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(debug = false) ⇒ Rosi

Returns a new instance of Rosi.



13
14
15
16
# File 'lib/irosi/download.rb', line 13

def initialize(debug=false)
  @debug = debug
  @todo_download_numbers = []
end

Class Method Details

.download(debug = false, &block) ⇒ Object



7
8
9
10
11
# File 'lib/irosi/download.rb', line 7

def self.download(debug=false,&block) 
  server = Rosi.new(debug)
  server.instance_eval(&block) 
  server.download_all
end

Instance Method Details

#download_allObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/irosi/download.rb', line 18

def download_all
  puts 'download_all starting...'
  @todo_download_numbers.each do |num|
    if @debug
      # do nothing
    else
      download_pics_albumID num
    end
  end
end

#item(i) ⇒ Object



29
30
31
32
# File 'lib/irosi/download.rb', line 29

def item(i)
  puts "download alburm number = #{i}"
  @todo_download_numbers << i
end