pinkman 0.9.9.9.7 → 0.9.9.9.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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49cfcfa42bf47e4d1d37463921194548b5baa855aab534f4b8b894df7e9629af
|
|
4
|
+
data.tar.gz: 759225692ad976cf718d1b6a681ebb83fac3ddece90bd7407780e9bb14e276ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3bf4c7db04d4cd6b9eff756bb1b6dd5c6b8c09aa83eeccd87be5e0d4c9a7d7bc0963d18f9229a417c2a94621cd658bfa8beb42dfe7fd40237b575f3ab56bce26
|
|
7
|
+
data.tar.gz: 846b934cfde288844793534d8dd261ea3a43e02cab1b256f8ad858f73988eda5328da99310d12a3332fe5a30db6469fca4a5e3b90999c4baf0b38cba9b956466
|
|
@@ -282,9 +282,29 @@ class window.PinkmanCollection extends window.PinkmanCommon
|
|
|
282
282
|
return @collection[(@collection.length - n - 1)..]
|
|
283
283
|
|
|
284
284
|
# Desc: return trues if has at least one member. If a criteria is specificied, returns true if at least one member satisfies it.
|
|
285
|
-
any: (criteria
|
|
286
|
-
if criteria?
|
|
287
|
-
|
|
285
|
+
any: (criteria) ->
|
|
286
|
+
if criteria?
|
|
287
|
+
# id version
|
|
288
|
+
if $p.isNumber(criteria)
|
|
289
|
+
return(@find(criteria)?)
|
|
290
|
+
|
|
291
|
+
# function version
|
|
292
|
+
else if $p.isFunction(criteria)
|
|
293
|
+
# console.log 'select: function'
|
|
294
|
+
value = false
|
|
295
|
+
@each (object) ->
|
|
296
|
+
value = true if criteria(object)
|
|
297
|
+
return(value)
|
|
298
|
+
|
|
299
|
+
# object version
|
|
300
|
+
else if $p.isObject(criteria)
|
|
301
|
+
# console.log 'select: object'
|
|
302
|
+
masterValue = false
|
|
303
|
+
@each (object) ->
|
|
304
|
+
value = true
|
|
305
|
+
(value = false if object[k] != v) for k,v of criteria
|
|
306
|
+
masterValue = true if value
|
|
307
|
+
return(masterValue)
|
|
288
308
|
else
|
|
289
309
|
@count() > 0
|
|
290
310
|
|
|
@@ -32,7 +32,9 @@ Pinkman.template_engines =
|
|
|
32
32
|
throw 'Pinkman: markup not found.'
|
|
33
33
|
|
|
34
34
|
template: (options) ->
|
|
35
|
-
|
|
35
|
+
# console.log options.template
|
|
36
|
+
# console.log options.engine
|
|
37
|
+
if Pinkman.templates.any(template: options.template, engine: options.engine)
|
|
36
38
|
template = Pinkman.templates.get(template: options.template, engine: options.engine)
|
|
37
39
|
else
|
|
38
40
|
template = new Pinkman.object(template: options.template, engine: options.engine)
|
data/lib/pinkman/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pinkman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.9.9.
|
|
4
|
+
version: 0.9.9.9.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Agilso Oliveira
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-04-
|
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|