class Leonardita::Scrapper
Attributes
raw_data[W]
uri[R]
Public Class Methods
new(url)
click to toggle source
# File lib/leonardita/scrapper.rb, line 11 def initialize(url) @uri = URI.parse(url) end
Public Instance Methods
raw_data()
click to toggle source
# File lib/leonardita/scrapper.rb, line 15 def raw_data @raw_data ||= response.body end
Protected Instance Methods
document()
click to toggle source
# File lib/leonardita/scrapper.rb, line 21 def document @document ||= Nokogiri::HTML(raw_data) end
response()
click to toggle source
# File lib/leonardita/scrapper.rb, line 25 def response @response ||= Net::HTTP.get_response(uri) end