class ChambaSearchMx::HTMLPage

loads web page using nokogiri

Attributes

content[R]

Public Class Methods

new(opts = {}) click to toggle source

@param <hash> options @see ChambaSearchMx::BASE_URL

# File lib/chamba_search_mx/html_page.rb, line 12
def initialize(opts = {})
  @base_url = opts[:base_url] || ChambaSearchMx::BASE_URL
end

Public Instance Methods

load(url) click to toggle source

loads Kokogiri::HTML:Document as @content which can be read @param <string>

# File lib/chamba_search_mx/html_page.rb, line 19
def load(url)
  @content = Nokogiri::HTML open("#{@base_url}#{url}")
end