dslh 0.1.2 → 0.1.3

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: 05bd3db7cd365153bc62bfd5ca60f0339347fccf
4
- data.tar.gz: 3883cbf261e329f9c416f6ac4261e3d2d88363c0
3
+ metadata.gz: 6c4a01b781d577a7737b7b55519c525ef57c1dcc
4
+ data.tar.gz: 584b9e8b0b599b902cbc409cd3feede61a3ee8c8
5
5
  SHA512:
6
- metadata.gz: af2978272adc61e408f4698de115f5140c701dc35a96593b01622d0af1e7dc7c2b2701920452610e946dd83793df6c1a25fc07b56baf5cb2332bebc07ebb08d1
7
- data.tar.gz: d4e58aecc378a41f1154bc5eb28c6ab875e0c22c217f0ff50da4db4704b3c48fb361425cfca348b0ea9d7e43e2161612ca9f6672080a42d7a83081383332d051
6
+ metadata.gz: cd1dcc567b02b9c0c2130055d45cc4868300485bb5902afc529c4b8eb711b7e23833b7786cc7c7d5233409f3af1d92566b1e9fadcd866dd97e794a7925f8c858
7
+ data.tar.gz: fdf5c4bd7e8b95bac5e36a1c6aa56436aa3bd43dfc282c1d31b6b03b54471e63ce2f94ae5fa572bdced5f5f72b1916fe62a40c5a6505a2178251f5a4ad287178
@@ -59,8 +59,8 @@ class Dslh
59
59
  if args.empty?
60
60
  @__hash__[method_name] = nested_hash
61
61
  else
62
+ args = args.map {|i| value_conv.call(i) } if value_conv
62
63
  value = args.length > 1 ? args : args[0]
63
- value = value_conv.call(value) if value_conv
64
64
 
65
65
  if nested_hash
66
66
  @__hash__[method_name] = {
@@ -1,3 +1,3 @@
1
1
  class Dslh
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -259,4 +259,16 @@ describe Dslh do
259
259
  {:key321=>{"value321"=>{:key3211=>"XXX", :key3212=>:XXX}}, :key322=>300}}}
260
260
  )
261
261
  end
262
+
263
+ it 'should convert array' do
264
+ h = Dslh.eval :value_conv => proc {|i| i.to_s } do
265
+ key1 'value1', 'value2'
266
+ key2 100, 200
267
+ end
268
+
269
+ expect(h).to eq(
270
+ {:key1 => ["value1", "value2"],
271
+ :key2 => ["100", "200"]}
272
+ )
273
+ end
262
274
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dslh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara