fish0 0.0.9 → 0.0.10
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 +4 -4
- data/lib/fish0/repository.rb +5 -1
- data/lib/fish0/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 514235dc27b0805dcd952c83f11d1e5c857743ac
|
|
4
|
+
data.tar.gz: 20904263d70aac6eff3d071413669845ae229b0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 495190333d0c5534ce6dc9ea45240cb2435da17f7e2a9ac9ef5168aff9584c99773e6c839c299700bfe58da9e3cd42c36a6c8eadb7d3fc131193339aa1392c24
|
|
7
|
+
data.tar.gz: 23138aa68c5f747fec05e72455e5b96630b9e338d6de4bd9cb56c9f1872f88ea79719195a3dfbf216265b5bc6141d5a80dac4907be72443c40f879fb57fdb210
|
data/lib/fish0/repository.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Fish0
|
|
|
10
10
|
|
|
11
11
|
include Enumerable
|
|
12
12
|
|
|
13
|
-
delegate :find, :aggregate,
|
|
13
|
+
delegate :find, :aggregate, to: :source
|
|
14
14
|
delegate :each, to: :all
|
|
15
15
|
|
|
16
16
|
def initialize(collection, entity_class = nil)
|
|
@@ -33,6 +33,10 @@ module Fish0
|
|
|
33
33
|
self
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def distinct(field)
|
|
37
|
+
@source.distinct field, @conditions
|
|
38
|
+
end
|
|
39
|
+
|
|
36
40
|
def first
|
|
37
41
|
element = fetch.limit(1).first
|
|
38
42
|
to_entity.call(element) if element
|
data/lib/fish0/version.rb
CHANGED