cornerstone-source 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/game.js CHANGED
@@ -5,7 +5,7 @@ Checks whether an object is an array.
5
5
 
6
6
  Object.isArray([1, 2, 4])
7
7
  # => true
8
-
8
+
9
9
  Object.isArray({key: "value"})
10
10
  # => false
11
11
 
@@ -25,10 +25,10 @@ Checks whether an object is a string.
25
25
 
26
26
  Object.isString("a string")
27
27
  # => true
28
-
28
+
29
29
  Object.isString([1, 2, 4])
30
30
  # => false
31
-
31
+
32
32
  Object.isString({key: "value"})
33
33
  # => false
34
34
 
@@ -50,11 +50,11 @@ First come, first served.
50
50
  a: 1
51
51
  b: 2
52
52
  c: 3
53
-
53
+
54
54
  Object.reverseMerge I,
55
55
  c: 6
56
- d: 4
57
-
56
+ d: 4
57
+
58
58
  I # => {a: 1, b:2, c:3, d: 4}
59
59
 
60
60
  @name reverseMerge
@@ -63,7 +63,7 @@ First come, first served.
63
63
  @returns {Object} target
64
64
  */
65
65
 
66
- Object.reverseMerge = function() {
66
+ Object.defaults = Object.reverseMerge = function() {
67
67
  var name, object, objects, target, _i, _len;
68
68
  target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
69
69
  for (_i = 0, _len = objects.length; _i < _len; _i++) {
@@ -83,11 +83,11 @@ Last in covers earlier properties.
83
83
  a: 1
84
84
  b: 2
85
85
  c: 3
86
-
86
+
87
87
  Object.extend I,
88
88
  c: 6
89
89
  d: 4
90
-
90
+
91
91
  I # => {a: 1, b:2, c:6, d: 4}
92
92
 
93
93
  @name extend
@@ -112,7 +112,7 @@ Object.extend = function() {
112
112
  Helper method that tells you if something is an object.
113
113
 
114
114
  object = {a: 1}
115
-
115
+
116
116
  Object.isObject(object)
117
117
  # => true
118
118
 
@@ -957,6 +957,9 @@ CommandStack = function() {
957
957
  return command;
958
958
  }
959
959
  },
960
+ current: function() {
961
+ return stack[index - 1];
962
+ },
960
963
  canUndo: function() {
961
964
  return index > 0;
962
965
  },
@@ -1009,6 +1009,9 @@ Bindable module.
1009
1009
  return command;
1010
1010
  }
1011
1011
  },
1012
+ current: function() {
1013
+ return stack[index - 1];
1014
+ },
1012
1015
  canUndo: function() {
1013
1016
  return index > 0;
1014
1017
  },
@@ -1,5 +1,5 @@
1
1
  module Cornerstone
2
2
  module Source
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -27,6 +27,9 @@ CommandStack = ->
27
27
 
28
28
  return command
29
29
 
30
+ current: ->
31
+ stack[index-1]
32
+
30
33
  canUndo: ->
31
34
  index > 0
32
35
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cornerstone-source
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Diebolt
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-06-21 00:00:00 Z
19
+ date: 2012-09-05 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirements:
25
25
  - - "="
26
26
  - !ruby/object:Gem::Version
27
- hash: 1808382141
27
+ hash: 3005530751
28
28
  segments:
29
29
  - 3
30
30
  - 0