dynarex 1.5.31 → 1.5.32

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: db34f474e385f85427193dd5a21a6f2b31f77dc1
4
- data.tar.gz: c7fcfcb05df3c616605973d7212c822d5c4e8277
3
+ metadata.gz: 7f4cf0e37713145775403f81cfaa6f321af4d40a
4
+ data.tar.gz: 038ee4cd18113cf15beaac5a66117d08b2dcc79b
5
5
  SHA512:
6
- metadata.gz: b6783b0af87fb256776e9954e48be98b75cb2044e0bba430eeadbb7f8c3550bb55cf61dbd794904e1aa3cee38beffc7e0968b84b0709b43f7213bebaf158cf42
7
- data.tar.gz: 0cb6faf8a7507e0807750c3e1d2f1f242521117ab6283fa01703ebf05765b3ead0be0a6a681a9ba4ca4d8c4e866c1e792220a115493173bddc555f897a66b2ca
6
+ metadata.gz: bccded194303c8e8073870c94e57e95eb171097029a902ae93377d6763de23959eeb80f0063a4bb81a8829dd47cc6c64ad68ca87445239e4e571871ea03abfd5
7
+ data.tar.gz: 07e2d46575a6b08d2c2b108fcffe78fa072ace763ba562fe7989597362ffed4eeb14b879a142b4b24a343efdc1f8658d9f24ee06e6edb34a0d0d88b9d8f5f67a
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- &5oM��2�bU �a՘c<�,�8��6n> ��l�����5�b�1�7U��*� aa�� �°C�#���P
2
- �![V�`ս^�������)S�DQ�>)�~�2��‡4�hX;W�s܌��Þ��o) ��d�G]�Ӷ�7���K���ˤ_ƒ��S�uľ��:|��cW4����zX��2��I/K��w���
3
- Y���/�b��� �Z ����&wN�YYxד<��4���TT����m��Mg�EZ'i�J E���Y���
1
+ +k�@ -e��T|[O{4
2
+ %�)9*���Ѐ���U;�
@@ -174,18 +174,19 @@ class Dynarex
174
174
  fields = select
175
175
 
176
176
  load_records if @dirty_flag == true
177
-
177
+
178
178
  if fields then
179
179
 
180
180
  case fields.class.to_s.downcase.to_sym
181
181
  when :string
182
182
  field = fields.to_sym
183
- @flat_records.map {|x| x[field]}
183
+ @flat_records.map {|row| {field => row[field]}}
184
184
  when :symbol
185
- field = fields
186
- @flat_records.map {|x| x[field]}
185
+ field = fields.to_sym
186
+ @flat_records.map {|row| {field => row[field]} }
187
187
  when :array
188
- fields.map {|field| @flat_records.map {|x| x[field.to_sym] } }
188
+ @flat_records.map {|row| fields.inject({})\
189
+ {|r,x| r.merge(x.to_sym => row[x.to_sym])}}
189
190
  end
190
191
 
191
192
  else
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.31
4
+ version: 1.5.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file