liquid_queries 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquid_queries/collection_methods.rb +15 -3
- data/lib/liquid_queries/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a872b98ae8ce9ff7b7adb9c0a3c20c5037a978e
|
4
|
+
data.tar.gz: dd30e6d4a10c3a1bb3bfa2741a2f1daa0be18c23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b65d84c3d850696a21d1fc533c3d64c5f05bf4a0e12569fb7db58b3532858d1826fa0256bc28160b9a1002f2d4f33607806b32b0e8d782e0b51f75e675c7147
|
7
|
+
data.tar.gz: 33619cd136eb8731f800d59dfd0a73eeeb7605b66514b166bfb36d3d69bc184aa84fbf612d0d99e713bd6d93e8e196126a7df34fcaee15827ee4d10b571eefea
|
@@ -7,6 +7,10 @@ module LiquidQueries::CollectionMethods
|
|
7
7
|
collection.any?
|
8
8
|
end
|
9
9
|
|
10
|
+
def count
|
11
|
+
collection.count
|
12
|
+
end
|
13
|
+
|
10
14
|
def current_page
|
11
15
|
collection.current_page
|
12
16
|
end
|
@@ -23,12 +27,16 @@ module LiquidQueries::CollectionMethods
|
|
23
27
|
collection.last
|
24
28
|
end
|
25
29
|
|
30
|
+
def length
|
31
|
+
collection.length
|
32
|
+
end
|
33
|
+
|
26
34
|
def order
|
27
35
|
::LiquidQueries::OrderQuery.new(collection: collection)
|
28
36
|
end
|
29
37
|
|
30
38
|
def pop
|
31
|
-
|
39
|
+
to_a.pop
|
32
40
|
end
|
33
41
|
|
34
42
|
def ransack
|
@@ -39,12 +47,16 @@ module LiquidQueries::CollectionMethods
|
|
39
47
|
::LiquidQueries::Collection.new(collection: collection.reverse_order)
|
40
48
|
end
|
41
49
|
|
50
|
+
def size
|
51
|
+
collection.size
|
52
|
+
end
|
53
|
+
|
42
54
|
def shift
|
43
|
-
|
55
|
+
to_a.shift
|
44
56
|
end
|
45
57
|
|
46
58
|
def to_a
|
47
|
-
collection.to_a
|
59
|
+
@_to_a ||= collection.to_a
|
48
60
|
end
|
49
61
|
|
50
62
|
def total_entries
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid_queries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|