module Rrm
Constants
- VERSION
Public Class Methods
all_ruby_versions()
click to toggle source
# File lib/rrm.rb, line 21 def self.all_ruby_versions @all_ruby_versions ||= fetch_all_ruby_versions end
fetch_all_ruby_versions()
click to toggle source
# File lib/rrm.rb, line 25 def self.fetch_all_ruby_versions versions = [] html = open('https://www.ruby-lang.org/en/downloads/releases/') doc = Nokogiri::HTML(html) rows = doc.search('tr') rows.each do |row| ver = row.search('td').first.text next if ver.include?('preview') next if ver.include?('rc') next if ver.include?('-p') versions << ver.split(' ').last rescue next end versions.compact.sort end
logger()
click to toggle source
# File lib/rrm.rb, line 17 def self.logger @logger ||= Logger.new('/tmp/rrm/rrm.log') end