Module: ForemanMaintain::Concerns::Versions
- Included in:
- Scenario
- Defined in:
- lib/foreman_maintain/concerns/versions.rb
Instance Method Summary collapse
- #at_least_version?(version) ⇒ Boolean
- #current_minor_version ⇒ Object
- #less_than_version?(version) ⇒ Boolean
Instance Method Details
#at_least_version?(version) ⇒ Boolean
8 9 10 |
# File 'lib/foreman_maintain/concerns/versions.rb', line 8 def at_least_version?(version) Gem::Version.new(current_version) >= Gem::Version.new(version) end |
#current_minor_version ⇒ Object
12 13 14 |
# File 'lib/foreman_maintain/concerns/versions.rb', line 12 def current_minor_version current_version.to_s[/^\d+\.\d+/] end |
#less_than_version?(version) ⇒ Boolean
4 5 6 |
# File 'lib/foreman_maintain/concerns/versions.rb', line 4 def less_than_version?(version) Gem::Version.new(current_version) < Gem::Version.new(version) end |