Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GCounter: add a + method.

+ increments a GCounter using the current Meangirls global node ID.
  • Loading branch information...
commit 8903c6a87c0b13100a0eea075fd727cb1bc0527b 1 parent 16af7aa
@aphyr authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/meangirls/g_counter.rb
View
5 lib/meangirls/g_counter.rb
@@ -37,6 +37,11 @@ def increment(node = 1, delta = 1)
self
end
+ # Adds delta to this counter, using the current Meangirls node ID.
+ def +(delta)
+ increment Meangirls.node, delta
+ end
+
def clone
c = super
c.e = @e.clone
Please sign in to comment.
Something went wrong with that request. Please try again.