From 6d629056a1fe71d3a2ffeef0200d64e9ce8a6e7c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 3 Jan 2021 12:07:12 +0100 Subject: [PATCH] ocaml: implement get_latest_version --- lib/docs/scrapers/ocaml.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/docs/scrapers/ocaml.rb b/lib/docs/scrapers/ocaml.rb index 6a3e448c..bd98222e 100644 --- a/lib/docs/scrapers/ocaml.rb +++ b/lib/docs/scrapers/ocaml.rb @@ -26,5 +26,10 @@ module Docs © INRIA 1995-2020. HTML + def get_latest_version(opts) + doc = fetch_doc('https://www.ocaml.org/releases/', opts) + doc.css('#main-contents li > a').first.content + end + end end