Method: Bundler::RubyVersion.from_string

Defined in:
lib/bundler/ruby_version.rb

.from_string(string) ⇒ RubyVersion, Nil

Returns a RubyVersion from the given string.

Parameters:

  • the (String)

    version string to match.

Returns:

  • (RubyVersion, Nil)

    The version if the string is a valid RubyVersion description, and nil otherwise.

[View source]

64
65
66
# File 'lib/bundler/ruby_version.rb', line 64

def self.from_string(string)
  new($1, $2, $3, $4) if string =~ PATTERN
end