dynarex 1.5.30 → 1.5.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dynarex.rb +22 -2
- metadata +2 -2
- metadata.gz.sig +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db34f474e385f85427193dd5a21a6f2b31f77dc1
|
4
|
+
data.tar.gz: c7fcfcb05df3c616605973d7212c822d5c4e8277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6783b0af87fb256776e9954e48be98b75cb2044e0bba430eeadbb7f8c3550bb55cf61dbd794904e1aa3cee38beffc7e0968b84b0709b43f7213bebaf158cf42
|
7
|
+
data.tar.gz: 0cb6faf8a7507e0807750c3e1d2f1f242521117ab6283fa01703ebf05765b3ead0be0a6a681a9ba4ca4d8c4e866c1e792220a115493173bddc555f897a66b2ca
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex.rb
CHANGED
@@ -169,9 +169,29 @@ class Dynarex
|
|
169
169
|
|
170
170
|
# Returns a ready-only snapshot of records as a simple Hash.
|
171
171
|
#
|
172
|
-
def flat_records
|
172
|
+
def flat_records(select: nil)
|
173
|
+
|
174
|
+
fields = select
|
175
|
+
|
173
176
|
load_records if @dirty_flag == true
|
174
|
-
|
177
|
+
|
178
|
+
if fields then
|
179
|
+
|
180
|
+
case fields.class.to_s.downcase.to_sym
|
181
|
+
when :string
|
182
|
+
field = fields.to_sym
|
183
|
+
@flat_records.map {|x| x[field]}
|
184
|
+
when :symbol
|
185
|
+
field = fields
|
186
|
+
@flat_records.map {|x| x[field]}
|
187
|
+
when :array
|
188
|
+
fields.map {|field| @flat_records.map {|x| x[field.to_sym] } }
|
189
|
+
end
|
190
|
+
|
191
|
+
else
|
192
|
+
@flat_records
|
193
|
+
end
|
194
|
+
|
175
195
|
end
|
176
196
|
|
177
197
|
alias to_h flat_records
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
zafTuKRozNy5wCw7Z32VaDGcJ+yTPq73CrcPrNyaoxqGfU0qNsh6oGvwrq4Q1k4j
|
32
32
|
Pz2GWE7KigXTBg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-07-
|
34
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex-import
|
metadata.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
�
|
1
|
+
�������+��IJ/�I�}�\|x������i-�m����G�FDsL�9��v��b�
|
2
|
+
d����ORSt�2�����������̈́��\����8$�D*
|
3
|
+
��3T.�ݏ5G�9�'D��3�w�iÇ��]������'�0���"��P�K��O��)ړ�v�J>�3�� qcJh�ɗ+0�]�b���M���1�TYnൈ�*�Q�b�P8eń]�s?����痼��Dt6�j9���թ%R��!
|