Class: CreateRubyGem::Detection::Runtime
- Inherits:
-
Object
- Object
- CreateRubyGem::Detection::Runtime
- Defined in:
- lib/create_ruby_gem/detection/runtime.rb
Overview
Detects the current Ruby, RubyGems, and Bundler versions.
Instance Method Summary collapse
- #detect! ⇒ RuntimeInfo
-
#initialize(bundler_detector: BundlerVersion.new) ⇒ Runtime
constructor
A new instance of Runtime.
Constructor Details
#initialize(bundler_detector: BundlerVersion.new) ⇒ Runtime
18 19 20 |
# File 'lib/create_ruby_gem/detection/runtime.rb', line 18 def initialize(bundler_detector: BundlerVersion.new) @bundler_detector = bundler_detector end |
Instance Method Details
#detect! ⇒ RuntimeInfo
24 25 26 27 28 29 30 |
# File 'lib/create_ruby_gem/detection/runtime.rb', line 24 def detect! RuntimeInfo.new( ruby: Gem::Version.new(RUBY_VERSION), rubygems: Gem::Version.new(Gem::VERSION), bundler: @bundler_detector.detect! ) end |