Class: BeerList::Establishments::MuddyWaters
- Inherits:
-
Establishment
- Object
- Establishment
- BeerList::Establishments::MuddyWaters
- Defined in:
- lib/beer_list/establishments/muddy_waters.rb
Constant Summary collapse
- URL =
'http://muddywatersmpls.com/booze.html'
Instance Attribute Summary
Attributes included from Listable
Instance Method Summary collapse
Methods inherited from Establishment
Methods included from Listable
Instance Method Details
#get_list ⇒ Object
6 7 8 |
# File 'lib/beer_list/establishments/muddy_waters.rb', line 6 def get_list get_processed_list end |
#get_processed_list ⇒ Object
14 15 16 17 18 19 |
# File 'lib/beer_list/establishments/muddy_waters.rb', line 14 def get_processed_list all = page.search('div.graphic_textbox_layout_style_default p').map(&:text) all.pop get_wine_count(all.reverse) all end |
#get_wine_count(ary = []) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/beer_list/establishments/muddy_waters.rb', line 21 def get_wine_count(ary=[]) count = 0 ary.each do |e| count += 1 break count if e.empty? end end |
#url ⇒ Object
10 11 12 |
# File 'lib/beer_list/establishments/muddy_waters.rb', line 10 def url URL end |