Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 2.5.0

* Update README with example for `members_from_rank_range`
* Update CHANGELOG.
* Bump version to 2.5.0.
  • Loading branch information...
commit e4b5922c79cbac93fa19d95807b8704326477fb3 1 parent a3ccf1b
@czarneckid czarneckid authored
View
4 CHANGELOG.markdown
@@ -1,5 +1,9 @@
# CHANGELOG
+## leaderboard 2.5.0 (2012-10-12)
+
+* Added `members_from_rank_range` and `members_from_rank_range_in` methods to be able to retrieve members from a leaderboard in a given rank range.
+
## leaderboard 2.4.0 (2012-07-30)
* Added `all_leaders` and `all_leaders_from` methods to retrieve all members from a leaderboard. You may also use the aliases `all_members` or `all_members_from`.
View
7 README.markdown
@@ -224,6 +224,13 @@ members = highscore_lb.member_at(4)
=> {:member=>"member_92", :rank=>4, :score=>92.0}
```
+Retrieve a range of members from the leaderboard within a given rank range:
+
+```ruby
+members = highscore_lb.members_from_rank_range(1, 5)
+ => [{:member=>"member_95", :rank=>1, :score=>95.0}, {:member=>"member_94", :rank=>2, :score=>94.0}, {:member=>"member_93", :rank=>3, :score=>93.0}, {:member=>"member_92", :rank=>4, :score=>92.0}, {:member=>"member_91", :rank=>5, :score=>91.0}]
+```
+
### Ranking multiple members in a leaderboard at once
Insert multiple data items for members and their associated scores:
View
2  lib/leaderboard/version.rb
@@ -1,4 +1,4 @@
class Leaderboard
# Leaderboard version
- VERSION = '2.4.0'.freeze
+ VERSION = '2.5.0'.freeze
end
View
2  spec/version_spec.rb
@@ -2,6 +2,6 @@
describe 'Leaderboard::VERSION' do
it 'should be the correct version' do
- Leaderboard::VERSION.should == '2.4.0'
+ Leaderboard::VERSION.should == '2.5.0'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.