material_raingular 0.0.2.4.7.alpha → 0.0.2.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df4d672f568ee580bebdb816f8b00f01067937bd
4
- data.tar.gz: 36299cbc73efd8e05f34f2017ad495dadb1b1637
3
+ metadata.gz: 2a3b22cdfb73a57ce563f01c16551e3bc4ba7a1b
4
+ data.tar.gz: c4fb24bae20b6e172c40e6e28bf89b5b7f587d22
5
5
  SHA512:
6
- metadata.gz: f34a2aac81912db2aeeec3287e2c79e3c142efc1aa3eeb9bf06f3a6937b99406a2a7e761f0527bfd014f0fbfdd275120b5248cae18eb2b88b0ecca545147226a
7
- data.tar.gz: ee235aec1e42082784d83e62da149966ecc3aca2ec4763bee4ae196f0cf0a38dc18664ddb4057665b60db2d98c953dc0d76d33d8d0efbe3c238b279b0bb30c18
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
@@ -1,3 +1,3 @@
1
1
  module MaterialRaingular
2
- VERSION = "0.0.2.4.7.alpha"
2
+ VERSION = "0.0.2.4.8"
3
3
  end
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.7.alpha
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-04 00:00:00.000000000 Z
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: 1.3.1
136
+ version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
139
  rubygems_version: 2.2.1