Sha256: 74a1294d555209e4089aeb618bde5c1e36a09700a94d379319d67bdceb616ecf

Contents?: true

Size: 507 Bytes

Versions: 8

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Synvert::Core
  # GemSpec checks and compares gem version.
  class Rewriter::RubyVersion
    # Initialize a ruby_version.
    #
    # @param version [String] ruby version
    def initialize(version)
      @version = version
    end

    # Check if the specified ruby version matches current ruby version.
    #
    # @return [Boolean] true if matches, otherwise false.
    def match?
      Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(@version)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
synvert-core-0.25.0 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.24.0 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.23.0 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.22.0 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.21.2 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.21.1 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.21.0 lib/synvert/core/rewriter/ruby_version.rb
synvert-core-0.20.1 lib/synvert/core/rewriter/ruby_version.rb