Module: StackOverflow::Utils
- Defined in:
- lib/rstackoverflow/utils.rb
Constant Summary collapse
- DOMAIN =
'http://stackoverflow.com'
Class Method Summary collapse
Class Method Details
.http_get(suffix) ⇒ Object
5 6 7 8 9 |
# File 'lib/rstackoverflow/utils.rb', line 5 def self.http_get(suffix) uri = URI("#{DOMAIN}#{suffix}") text = Net::HTTP.get(uri) Nokogiri::HTML(text) end |