dynarex 1.5.43 → 1.5.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ac5d9fbf4029016840cdd9fdb8b7e0befc2bda8
4
- data.tar.gz: e28cc3bb3b3e9da6e6297ca5abe47e11218dbe8d
3
+ metadata.gz: c1c986b9441b99e1547f35ee19d77b76040b21ef
4
+ data.tar.gz: 02622b66cc1a6f205a30d8379869d0a813306c0d
5
5
  SHA512:
6
- metadata.gz: d51b57f0bd3ba3068d1c8fe136f93b675ecf6d4800b328d0d3cc34c09dd88b6f33f3603fe79e2c632afc3a2201ea48ac137dd2716b24a89f2b5b95f0ace988f3
7
- data.tar.gz: 333a9c0c51e8b86ebd8bfc486b8244594a24c95946d705d627d06104e02d0a5ecd1b118dc53e17507c95d903e4aab228cc96c324c984e2235770167a0ba28333
6
+ metadata.gz: a45c1a8f2f09145a603afc65b0524d8ce320fd1d8ac07d02b1a6c0db6921db93a6680eafe04eddec5916004356ab0cabae7b569f768e449405763afb352416f9
7
+ data.tar.gz: 082274e61e178944ed177498ed61aa2e30cd5b5c7dd916a7b2cdd49755a521381726676d4791053eb10721fb5c919a53e7a77779b5b76d4c7d2e728cc50a98e4
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -374,12 +374,20 @@ EOF
374
374
  # dynarex = Dynarex.new 'contacts/contact(name,age,dob)'
375
375
  # dynarex.create name: Bob, age: 52
376
376
 
377
- def create(arg, id: nil, custom_attributes: {})
377
+ def create(obj, id: nil, custom_attributes: {})
378
378
 
379
- raise 'Dynarex#create(): input error: no arg provided' unless arg
380
-
381
- methods = {Hash: :hash_create, String: :create_from_line}
382
- send (methods[arg.class.to_s.to_sym]), arg, id, attr: custom_attributes
379
+ raise 'Dynarex#create(): input error: no arg provided' unless obj
380
+
381
+ case obj.class.to_s.downcase.to_sym
382
+ when :hash
383
+ hash_create obj, id, attr: custom_attributes
384
+ when :string
385
+ create_from_line obj, id, attr: custom_attributes
386
+ when :recordx
387
+ hash_create obj.to_h, id || obj.id, attr: custom_attributes
388
+ else
389
+ hash_create obj.to_h, id, attr: custom_attributes
390
+ end
383
391
 
384
392
  @dirty_flag = true
385
393
 
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.43
4
+ version: 1.5.44
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-10-31 00:00:00.000000000 Z
34
+ date: 2015-12-08 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex-import
metadata.gz.sig CHANGED
Binary file