Class: RubyChecker::Versions
- Inherits:
-
Object
- Object
- RubyChecker::Versions
- Defined in:
- lib/ruby_checker/versions.rb
Overview
Versions performs checks on the given versions (current and supported).
Instance Method Summary collapse
-
#check! ⇒ Object
check! performs tests for the current and the supported versions of ruby.
-
#initialize(current:, supported:) ⇒ Versions
constructor
A new instance of Versions.
Constructor Details
Instance Method Details
#check! ⇒ Object
check! performs tests for the current and the supported versions of ruby. It returns true if nothing bad is happening, false if there was a warning, and it will raise an OutdatedRubyError if the version mismatch is unbearable.
36 37 38 39 40 41 42 43 44 |
# File 'lib/ruby_checker/versions.rb', line 36 def check! if @current > @supported check_newer_versions elsif @current < @supported check_older_versions! else true end end |