glue_gun_dsl 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: fd26c5b4ba6c9831e91835a2d771d9cec019b94d25124e68ed006ba40aa545e8
4
- data.tar.gz: 7d5572e0ff530ef4ed03b2ae8b8cde2261b7215fed9cec34f81722a0238287b6
3
+ metadata.gz: d171bf5b89935cfbb7f73b6add32d1a2a98a6ec84d657eff4500d8de1aaa57d2
4
+ data.tar.gz: e9290e534a44f9ca5a8b64340e47c9ff7a186c45e39b500a363c6186451fae99
5
5
  SHA512:
6
- metadata.gz: 5847c254dfe071b87b731d835a50b62be82f9c7638b281174e3aacd60cc29621c8c7027abcb09597e426b2275b7183b2ba8b6dd6f1fc192e0d50f7c4bc65b954
7
- data.tar.gz: ebcea322a43228b6912176dfd7bb3a66df37da5ea5ce82c1415d1fe93ab1961b1ce7a244da3590a627488d0d6c62a24f9fe3a70d055679d347077276b127d011
6
+ metadata.gz: 589a3cc8f145665ef33cc2ba98f4b503fec3eab9a187bd03a7c6582641218a6947711b98971f76e98c67f2f9df350a9426228a77ee69d3dcd96062316734a7c3
7
+ data.tar.gz: 766fcd59efebfd026696da619e1c399f5c53f5878bea1f4c7ef4580b0c8141b403c6787a6e5be0dff7a78f203ee9e9444c0652523ede6e9542b25e0710da8da1
data/lib/glue_gun/dsl.rb CHANGED
@@ -268,8 +268,12 @@ module GlueGun
268
268
  (attr_config.source == attr_name.to_sym) || (attr_config.name == attr_name.to_sym)
269
269
  end
270
270
 
271
- bound_attrs.each do |dep_attr_name, _|
272
- dependency_instance.send("#{dep_attr_name}=", value) if dependency_instance.respond_to?("#{dep_attr_name}=")
271
+ bound_attrs.each do |dep_attr_name, config_attr|
272
+ block = config_attr.block.present? ? config_attr.block : proc { |att| att }
273
+ if dependency_instance.respond_to?("#{dep_attr_name}=")
274
+ dependency_instance.send("#{dep_attr_name}=",
275
+ block.call(value))
276
+ end
273
277
  end
274
278
  end
275
279
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GlueGun
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glue_gun_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Shollenberger