Sha256: 73c60f86ef351241161ea5aa86b5d066388ece114382f2a8020b1c54f7cd74ed
Contents?: true
Size: 571 Bytes
Versions: 121
Compression:
Stored size: 571 Bytes
Contents
require "#{File.dirname(__FILE__)}/../dataflow" require 'net/http' include Dataflow # Be gentle running this one Thread.abort_on_exception = true local do |stream, branding_occurences, number_of_mentions| unify stream, Array.new(10) { need_later { Net::HTTP.get_response(URI.parse("http://www.cuil.com/search?q=#{rand(1000)}")).body } } unify branding_occurences, need_later { stream.map {|http_body| http_body.scan /cuil/ } } unify number_of_mentions, need_later { branding_occurences.map {|occurences| occurences.length } } puts number_of_mentions.inspect end
Version data entries
121 entries across 121 versions & 3 rubygems