class BeerList::Establishments::LowryUptown

Constants

URL

Public Instance Methods

get_list() click to toggle source
# File lib/beer_list/establishments/lowry_uptown.rb, line 6
def get_list
  base_list
  match_before_abv
  strip
end
url() click to toggle source
# File lib/beer_list/establishments/lowry_uptown.rb, line 12
def url
  URL
end

Private Instance Methods

base_list() click to toggle source
# File lib/beer_list/establishments/lowry_uptown.rb, line 18
def base_list
  @beers = page.search('div.third_col').first.search('p').map(&:text)
end
match_before_abv() click to toggle source
# File lib/beer_list/establishments/lowry_uptown.rb, line 22
def match_before_abv
  @beers = @beers.map{ |beer| beer.match(/\d+\.?\d*%/); $` }.compact
end
strip() click to toggle source
# File lib/beer_list/establishments/lowry_uptown.rb, line 26
def strip
  @beers = @beers.map{ |beer| beer.gsub(/\A\W*|\W*\z/, '') }
end