Class: AddressFinder::Bulk

Inherits:
Object
  • Object
show all
Defined in:
lib/addressfinder/bulk.rb

Defined Under Namespace

Classes: ClientProxy

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Bulk

Returns a new instance of Bulk.



3
4
5
# File 'lib/addressfinder/bulk.rb', line 3

def initialize(&block)
  @block = block
end

Instance Method Details

#performObject



7
8
9
10
11
12
13
# File 'lib/addressfinder/bulk.rb', line 7

def perform
  Net::HTTP.start(config.hostname, config.port, use_ssl: true,
                                                open_timeout: config.timeout,
                                                read_timeout: config.timeout) do |http|
    block.call ClientProxy.new(http: http)
  end
end