blood_contracts-ext 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: f6c41d868275bec56ce3e23362086fea4e6760367ed16b6a2df5edf45a0fb81a
4
- data.tar.gz: 8876480c1475350dca5bfde8e66946259e1fd32bbe68757c45fa989e99ef59fb
3
+ metadata.gz: de7cde41f8ed2a4d5af74de5c1229c8d7fbf4c2a4b0f3a42986861fbedc8990a
4
+ data.tar.gz: 724c7604e77f776b91ecea0755b1665538a7336a1098059649bbf3fde3fd21a3
5
5
  SHA512:
6
- metadata.gz: caa86fd2ae88b06a99017f7cef51a65a10f268ae53d885bdd34a24bdcdc7e83ea0ef7fe33ff62d83eb932ee60e29136e23107024148e8aa6f7ab63107d75e22f
7
- data.tar.gz: 87831dc33a43ef69afa0a76e12e13e30aa63a222e39e0426360aef414610b649da9b1602a8b819a8d9026aa3b98d678c57b0b6210d0ae2995a2949a8e4c5adc8
6
+ metadata.gz: 751cc11b82bfb8c3486f8360541f3663c7bcc7d8a3960f93c59b51b98131c4818ff728f72b738a45745272784bbe1583a223c27ad47c1ac4633ab225fe8a7582
7
+ data.tar.gz: 15f7dbcd27561aca9f52e7e9bfa80020cdc84204441b580e7612d0176c0e9dba541da6cf20bb9c9e23a9a1df68660f61f827d68f675ee36591f3af598caf4b2d
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "blood_contracts-ext"
3
- gem.version = "0.1.1"
3
+ gem.version = "0.1.2"
4
4
  gem.authors = ["Sergey Dolganov (sclinede)"]
5
5
  gem.email = ["sclinede@evilmartians.com"]
6
6
 
@@ -22,7 +22,7 @@ module BloodContracts::Core
22
22
  # @private
23
23
  def inherited(child)
24
24
  super
25
- child.instance_variable_set(:@extractors, {})
25
+ child.instance_variable_set(:@extractors, extractors || {})
26
26
  end
27
27
 
28
28
  # DSL to define which method to use to extract data from the value
@@ -13,12 +13,20 @@ RSpec.describe BloodContracts::Core::MapValue do
13
13
  extend Forwardable
14
14
  extract :name
15
15
  extract :phone
16
+
17
+ def_delegators :@value, :name, :phone
18
+ end
19
+
20
+ class ContactWithManagerType < ContactType
16
21
  extract :manager_id
17
22
 
18
- def_delegators :@value, :name, :phone, :manager_id
23
+ def manager_id
24
+ value.manager_id
25
+ end
19
26
  end
20
27
 
21
- ContactJsonType = ContactType.and_then(BC::MapValue.with(JsonMapper))
28
+ ContactJsonType =
29
+ ContactWithManagerType.and_then(BC::MapValue.with(JsonMapper))
22
30
  Contact = Struct.new(:name, :phone, :manager_id)
23
31
  end
24
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blood_contracts-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Dolganov (sclinede)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blood_contracts-core