material_raingular 0.0.2.4.7.alpha → 0.0.2.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/extensions.coffee +26 -0
- data/lib/material_raingular/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3b22cdfb73a57ce563f01c16551e3bc4ba7a1b
|
4
|
+
data.tar.gz: c4fb24bae20b6e172c40e6e28bf89b5b7f587d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8dfe5908619d47ee5ee6b8d82b6390297ade87cf02c7f3bd3a7ecbad08f135892dd70bc108b10836ac4631be2fa525b4df10785d2fb9caff787b07e265bf2da
|
7
|
+
data.tar.gz: 0f5aac604d994e6b43ce59775f18526b656945bd1982402fc193954e2cdcb65314105db4b6635e28b4ad879421bab3b4170d936cc6515fd025b10972fbaefd45
|
@@ -1,7 +1,33 @@
|
|
1
|
+
Array.prototype.empty = ->
|
2
|
+
this.length == 0
|
3
|
+
Array.prototype.present = ->
|
4
|
+
this.length != 0
|
1
5
|
Array.prototype.min = ->
|
2
6
|
return Math.min.apply(null,this)
|
3
7
|
Array.prototype.max = ->
|
4
8
|
return Math.max.apply(null,this)
|
9
|
+
Array.prototype.railsMap = (func)->
|
10
|
+
args = func.match(/\|(.*)\|,(.*)/) || []
|
11
|
+
throw 'Invalid syntax "|a|, a.b"' unless args.length == 3
|
12
|
+
arr = []
|
13
|
+
for obj in this
|
14
|
+
eval args[1] + '= obj'
|
15
|
+
arr.push eval args[2]
|
16
|
+
arr
|
17
|
+
Array.prototype.compact = ->
|
18
|
+
arr = []
|
19
|
+
for i in this
|
20
|
+
arr.push(i) if !!i or i == false
|
21
|
+
arr
|
22
|
+
Array.prototype.flatten = ->
|
23
|
+
arr = []
|
24
|
+
for l in this
|
25
|
+
if Array.isArray(l)
|
26
|
+
for i in l.flatten()
|
27
|
+
arr.push i
|
28
|
+
else
|
29
|
+
arr.push l
|
30
|
+
arr
|
5
31
|
Array.prototype.sum = ->
|
6
32
|
total = 0
|
7
33
|
for i in this
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: material_raingular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2.4.
|
4
|
+
version: 0.0.2.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Moody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,9 +131,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - "
|
134
|
+
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
139
|
rubygems_version: 2.2.1
|