[devdocsgjs/main: 1458/1867] ocaml: implement get_latest_version




commit 6d629056a1fe71d3a2ffeef0200d64e9ce8a6e7c
Author: Simon Legner <Simon Legner gmail com>
Date:   Sun Jan 3 12:07:12 2021 +0100

    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
       &copy; 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]