Method: ChefUtils::VersionString#=~
- Defined in:
- lib/chef-utils/version_string.rb
#=~(other) ⇒ Boolean
Matching operator to support checking against a requirement string.
138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/chef-utils/version_string.rb', line 138 def =~(other) case other when Regexp super else begin Gem::Requirement.create(other) =~ parsed_version rescue ArgumentError # one side of the comparison wasn't parsable super end end end |