Class: AMarmita::Meals::Base
Instance Attribute Summary
Attributes inherited from ClientModule
#client
Instance Method Summary
collapse
#initialize
Instance Method Details
#desserts(date = nil, week_number = nil) ⇒ Object
26
27
28
|
# File 'lib/a_marmita/meals/base.rb', line 26
def desserts(date = nil, week_number = nil)
get_meals(DESSERT, date, week_number)
end
|
#main_courses(date = nil, week_number = nil) ⇒ Object
22
23
24
|
# File 'lib/a_marmita/meals/base.rb', line 22
def main_courses(date = nil, week_number = nil)
get_meals(MAIN_COURSE, date, week_number)
end
|
#soups(date = nil, week_number = nil) ⇒ Object
18
19
20
|
# File 'lib/a_marmita/meals/base.rb', line 18
def soups(date = nil, week_number = nil)
get_meals(SOUP, date, week_number)
end
|
10
11
12
13
14
15
16
|
# File 'lib/a_marmita/meals/base.rb', line 10
def
page = get_page "http://www.amarmita.com/ementa.php"
content_rows = page.parser.css('#conteudo > table > tr')
{ available_days: parse_links(page), list: parse_meals(content_rows) }
end
|