Sha256: 117e0912f75594fd734e8acab7631c45cf9df7ba0c811f3ea750c88410751f4d

Contents?: true

Size: 283 Bytes

Versions: 2

Compression:

Stored size: 283 Bytes

Contents

class FetchListOfCountries
  def todo(no_input)
    http = EventMachine::HttpRequest.new(list_of_countries_url, :connect_timeout => 2, :inactivity_timeout => 3)
    http.get
  end

  private

  def list_of_countries_url
    'http://api.worldbank.org/countries?format=json'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
em-dextras-0.4.0 doc/samples/worldbank/fetch_list_of_countries.rb
em-dextras-0.3.0 doc/samples/worldbank/fetch_list_of_countries.rb