Module: BeerList::Listable

Included in:
Establishments::Establishment, BeerList::Leads::BeerAdvocate
Defined in:
lib/beer_list/listable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/beer_list/listable.rb', line 3

def page
  @page
end

Instance Method Details

#get_listObject

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/beer_list/listable.rb', line 14

def get_list
  raise NotImplementedError
end

#listObject



5
6
7
8
# File 'lib/beer_list/listable.rb', line 5

def list
  visit_page unless page
  @list ||= BeerList::List.new establishment: short_class_name, array: get_list
end

#short_class_nameObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/beer_list/listable.rb', line 10

def short_class_name
  raise NotImplementedError
end