Sha256: d1b5f4b5d8640793d19dbf20901b0fbcfb2da2fec2c0b10360d1ad8178861ef6

Contents?: true

Size: 525 Bytes

Versions: 15

Compression:

Stored size: 525 Bytes

Contents

module Latest
  class MRI

    SOURCE = 'http://ftp.ruby-lang.org/pub/ruby/'
    AVAILABLE_EXTS = ['.tar.gz', '.zip', '.tar.bz2']

    attr_reader :short_ver, :source

    def initialize(short_ver, retriever)
      @short_ver = short_ver
      @retriever = retriever
      @source = SOURCE
    end

    def version
      @version ||= @retriever.retrieve(self)
    end

    def link(ext = '.tar.gz')
      if AVAILABLE_EXTS.include?(ext)
        source + short_ver + '/ruby-' + version.to_s + ext
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
latest_ruby-3.3.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-3.2.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-3.1.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-3.0.2 lib/latest_ruby/rubies/mri.rb
latest_ruby-3.0.1 lib/latest_ruby/rubies/mri.rb
latest_ruby-3.0.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-2.0.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-1.0.0 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.7 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.6 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.5 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.4 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.3 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.2 lib/latest_ruby/rubies/mri.rb
latest_ruby-0.0.1 lib/latest_ruby/rubies/mri.rb