Class: RubyDep::Travis::RubyVersion
- Inherits:
-
Object
- Object
- RubyDep::Travis::RubyVersion
- Defined in:
- lib/ruby_dep/travis/ruby_version.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- REGEXP =
/^ (?: (?<engine>ruby|jruby) -)? (?<version>\d+\.\d+\.\d+(?:\.\d+)?) (?:-p\d+)? (?:-clang)? $/x
Instance Method Summary collapse
-
#initialize(travis_version_string) ⇒ RubyVersion
constructor
A new instance of RubyVersion.
- #segments ⇒ Object
Constructor Details
#initialize(travis_version_string) ⇒ RubyVersion
Returns a new instance of RubyVersion.
31 32 33 34 |
# File 'lib/ruby_dep/travis/ruby_version.rb', line 31 def initialize(travis_version_string) ruby_version_string = version_for(travis_version_string) @version = Gem::Version.new(ruby_version_string) end |
Instance Method Details
#segments ⇒ Object
36 37 38 |
# File 'lib/ruby_dep/travis/ruby_version.rb', line 36 def segments @version.segments end |