Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/string/version_match.rb

Instance Method Summary collapse

Instance Method Details

#version_match?(req) ⇒ Boolean

Returns true if the given requirement is satisfied by the current String.

Parameters:

  • req (String)

    Gem version requirement

Returns:

  • (Boolean)

    true if the given requirement is satisfied by the current String



5
6
7
# File 'lib/dionysus/string/version_match.rb', line 5

def version_match?(req)
  Gem::Requirement.new(req) =~ Gem::Version.new(self)
end