Module: Helpers

Included in:
Ballpark, Homerun
Defined in:
lib/yabo_tracker/helpers.rb

Constant Summary collapse

BASE_URL =
"http://www.hittrackeronline.com/detail.php"

Class Method Summary collapse

Class Method Details

.build_base_url(id, type = "ballpark") ⇒ Object



7
8
9
# File 'lib/yabo_tracker/helpers.rb', line 7

def self.build_base_url(id, type = "ballpark")
  BASE_URL + "?id=#{id}&type=#{type}"
end

.generate_nokogiri_html(url) ⇒ Object



11
12
13
# File 'lib/yabo_tracker/helpers.rb', line 11

def self.generate_nokogiri_html(url)
  Nokogiri::HTML(Net::HTTP.get(URI(url)))
end