class Openfoodfacts::IngredientThatMayBeFromPalmOil

Constants

LOCALE_PATHS

TODO: Add more locales

Public Class Methods

all(locale: DEFAULT_LOCALE, domain: DEFAULT_DOMAIN) click to toggle source

Get ingredients that may be from palm oil

# File lib/openfoodfacts/ingredient_that_may_be_from_palm_oil.rb, line 18
def all(locale: DEFAULT_LOCALE, domain: DEFAULT_DOMAIN)
  if path = LOCALE_PATHS[locale]
    Product.tags_from_page(self, "https://#{locale}.#{domain}/#{path}")
  end
end

Public Instance Methods

products(page: -1) click to toggle source

Get products with ingredient that may be from palm oil

# File lib/openfoodfacts/ingredient_that_may_be_from_palm_oil.rb, line 28
def products(page: -1)
  Product.from_website_page(url, page: page, products_count: products_count) if url
end