service_caller 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/service_error.rb +4 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6afa477dd94592e09fc200d8168ffdb2c0217f4aa05b9b3082674d007bc44fab
4
- data.tar.gz: e4e80bb81839255a0b976e6888aaf322d77615ae742c627df932540c57b9e9ac
3
+ metadata.gz: 91631cd0027685c1c057180de95798ed42a6d2e7f585eb9063444fc8ddffa0ee
4
+ data.tar.gz: 2cd210a87a12960e0d8dcd462d0f21f472bacf7ffbc95e4f6595ffb7a6e36411
5
5
  SHA512:
6
- metadata.gz: 2cc1cb1018e4e0760373b042b726edcd857aea0af38e2054551a321f8ea759e6c2cafc7fbaa26974ae2486fbdf7c17df048fd258cfcd0b34e005713f7552e4f1
7
- data.tar.gz: db4b7f8aac96d0f3b6e0517fbb3f62c1d122de6c62dfb5eb3c4549843e6601393ee2e253dc92b2013f67c49c05193bbb6e9d207b32177eee5e3b291dd4cc5172
6
+ metadata.gz: 700cc1a39f08679a8178b477f974408ad94d6831654c4298b969434b2ec3e9911efaca6d35f6c4e159254f48c1d9ca5aec092b7dcd63021cd06ceab5301c3eab
7
+ data.tar.gz: f0d87f6b7f9447b488ab44769560e8fc2f7426992738dba5a89d0d411e7de39f549ed32188d47e7abbc8b80cf486428c8ade2ab1b9864d17bbbbd4bbd439e8f6
data/lib/service_error.rb CHANGED
@@ -7,6 +7,10 @@ class ServiceError < StandardError
7
7
  service_err.set_backtrace(exception.backtrace)
8
8
  service_err
9
9
  end
10
+
11
+ def generate_from_hash(error_hash)
12
+ new(error_hash[:error_code], error_hash[:error_message])
13
+ end
10
14
  end
11
15
 
12
16
  def initialize(code, message)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_caller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-01 00:00:00.000000000 Z
11
+ date: 2019-08-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: basic implement of service object
14
14
  email: laura34963@kdanmobile.com