soveran / ohm

Object-Hash Mapping for Redis
http://ohm.keyvalue.org
MIT License
1.4k stars 167 forks source link

Uses keyword arguments for #rank and #range #221

Closed pote closed 7 years ago

pote commented 7 years ago

This allows for a slightly nicer API:

Player.all.rank(by: :score, start: 0, stop: 10)

It does, however, mean Ohm would no longer work in versions of Ruby that don't support the required keyword argument syntax (meaning, below 2.1), but this should be okay considering support for Ruby 2.0 has officially ended last year.