Sha256: ef267148566fdc68ab59d7f8a67d57bf9d3f8b3be9ba5d13922e653472619d18

Contents?: true

Size: 386 Bytes

Versions: 7

Compression:

Stored size: 386 Bytes

Contents

require 'forwardable'
require 'versionomy'

module Latest
  class RubyVersion

    extend Forwardable

    def initialize(version)
      @version = get_version(version)
    end

    def <=>(other)
      @version <=> other.instance_variable_get(:@version)
    end

    def_delegators :@version, :to_s

    private

    def get_version(ver)
      Versionomy.parse(ver)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
latest_ruby-0.0.7 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.6 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.5 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.4 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.3 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.2 lib/latest_ruby/ruby_version.rb
latest_ruby-0.0.1 lib/latest_ruby/ruby_version.rb