leftronic 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,7 @@ class Leftronic
40
40
  # Push a new leaderboard
41
41
  # Entries is a hash of the form {:key_name_1 => :value, :key_name_2 => :value}
42
42
  # Sorts by value, and then pushes the top 12
43
- def leaderboard(name, entries)
43
+ def leaderboard(name, entries, &block)
44
44
  values = []
45
45
 
46
46
  entries.each do |hash|
@@ -53,7 +53,7 @@ class Leftronic
53
53
  if b.nil?
54
54
  a
55
55
  else
56
- a["value"] <=> b["value"]
56
+ b["value"] <=> a["value"]
57
57
  end
58
58
  end[0..11]
59
59
 
@@ -1,3 +1,3 @@
1
1
  module Leftronic
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: leftronic
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Grove