Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 17 additions and 12 deletions.
  1. +0 −12 public/js/mappy.js
  2. +17 −0 src/mappy.coffee
View
12 public/js/mappy.js
@@ -1,12 +0,0 @@
-(function() {
- var Mappy;
-
- Mappy = (function() {
-
- function Mappy() {}
-
- return Mappy;
-
- })();
-
-}).call(this);
View
17 src/mappy.coffee
@@ -0,0 +1,17 @@
+# Mappy
+class Mappy
+ constructor: (@tracker) ->
+ # Get redis
+ @redis = require('./lib/redis.coffee')
+
+ add: (point) ->
+ # Add point to end of redis for tracker
+ return @redis.rpush @tracker, point
+
+ getAll: ->
+ # Get all points in an array from tracker
+ return @redis.lrange @tracker, 0, -1
+
+ clear: ->
+ # Delete all points for a tracker (and from redis)
+ return @redis.del @tracker

No commit comments for this range

Something went wrong with that request. Please try again.