class Version
Constants
- GEMSPEC_FILE
Public Class Methods
min_version_met?(min_version)
click to toggle source
# File lib/version.rb, line 14 def min_version_met?(min_version) new.send(:min_version_met?, min_version) end
version()
click to toggle source
these class methods exist because I don't want to have to call `Version.new.version` elsewhere
# File lib/version.rb, line 10 def version new.send(:version) end
Private Instance Methods
gemspec()
click to toggle source
# File lib/version.rb, line 35 def gemspec @gemspec ||= Gem::Specification.load(GEMSPEC_FILE) end
min_version_met?(min_version)
click to toggle source
# File lib/version.rb, line 31 def min_version_met?(min_version) Gem::Version.new(version) >= Gem::Version.new(min_version) end
version()
click to toggle source
these instance methods exist so that I don't have to clear class variables between tests
# File lib/version.rb, line 22 def version unless gemspec Output.error("Unable to load gemspec at '#{GEMSPEC_FILE}") return nil end gemspec.version end