Class: ProxyTester::Reporters::FetchUrls

Inherits:
Object
  • Object
show all
Defined in:
lib/proxy_tester/reporters/fetch_urls.rb

Instance Method Summary collapse

Constructor Details

#initialize(output = $stdout) ⇒ FetchUrls



12
13
14
# File 'lib/proxy_tester/reporters/fetch_urls.rb', line 12

def initialize(output = $stdout)
  @output = output
end

Instance Method Details

#data(d) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/proxy_tester/reporters/fetch_urls.rb', line 20

def data(d)
  output.printf "%-10s: %s\n", 'proxy', d[:proxy]
  output.printf "%-10s: %s\n", 'url', d[:url]
  output.printf "%-10s: %s\n", 'status', d[:status]

  output.printf "%-10s:\n", 'headers'

  d[:headers].each do |h,v|
    output.printf "  %-20s: %s\n", h, v
  end
end

#headerObject



16
17
18
# File 'lib/proxy_tester/reporters/fetch_urls.rb', line 16

def header
  puts 'Results of run'
end