Method: Library::Version::Constraint#to_proc
- Defined in:
- lib/library/version.rb
#to_proc ⇒ Object
Convert constraint to Proc object which can be used to test a version number.
322 323 324 325 326 327 |
# File 'lib/library/version.rb', line 322 def to_proc lambda do |v| n = Version::Number.parse(v) n.send(operator, number) end end |