object_attorney 2.1.2 → 2.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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDY1NGY3N2NlMjUyNDg4N2E2NGY2MTExMjhiNDg4YmU1NGRkM2E1ZA==
4
+ MTNkY2ZkYWY2YWQ2Zjk0MWM2MTBmYTNjN2M4NDFkNDkwMTVmMWE2Yw==
5
5
  data.tar.gz: !binary |-
6
- OWVjYjNkZGJkMDVlNmRhZmZlY2E0NDQ4Y2MwYjYyZTA4ZTYzNGJmNA==
6
+ NTA2YjBiNjgwZDI5OGJiYmI5Y2ZlYTc3ZTFmN2Y2MWNjMWY1MWFlNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmZhNTQ3NTg4Y2FjYWExM2M1ZDE1OGU2ODc2YTMxYmY5ZjhlYTgzMDQ3YjJm
10
- NWE2NmYyN2FjMWFmOTIzNjA5ZDk3MjdhODhlZTU0YzVmOWRkNTEyYzViMmI0
11
- YjU3OWJkNTA4ZmZlMmNjNTEyYzM2ZGYzN2E1ZjNmM2ZiMDk1M2Y=
9
+ OTNhOTMzYjJmMDcxMzQ1YzFjMDRiYzlmNzE0NTYyMWVkNGE1YmU0NTVhYTRl
10
+ MTc1MjM5NDc4OGNlZDQ5Y2EzYjgwZWU2N2JhZDQxMmRhN2M3OTU3Y2ZmNTNh
11
+ ZDM1YzY2ODgzOWQ4MDk4OWZkNDdlNTMyYWM5MTk5YjcxZGE4YzU=
12
12
  data.tar.gz: !binary |-
13
- ODAwYjliMmU0M2Y4YjEwOTg0ZGMxMzU5NDkxYjg5ODgzZDk2M2JmNGE2Y2M1
14
- ZTE4OTJiZTdiODIzNmZmYTllN2VmYWViZmNlYzMzMDk0ZTkyODYyOGQ5NjE4
15
- Zjc4NmVhNWYyMTdlYTczMDRiNzY1ODFlNDMzOThkZjMwZDRmMmM=
13
+ OTk3MTgzOWE2YjI5NDA2OTBkYzdjYzgyNjYzZjY4MzQ5OGFiYWQyZTUyYmNh
14
+ NWE5ZGI3ZmNkNjQ2M2FhNTJlNjU5MjNmNGExMDExYWJhYzk2N2RiOWViMjc1
15
+ MmEwZDM1MDY2NTI3YWIzNjgyZTUxYzI1NGRlNTRjZDI2MDhiZDI=
@@ -93,9 +93,14 @@ module ObjectAttorney
93
93
  self.instance_variable_set("@represented_object_reflection", Reflection.new(represented_object_name, options))
94
94
 
95
95
  define_method(represented_object_name) { represented_object }
96
+
97
+ delegate_properties(*options[:properties], to: represented_object_name) if options.include?(:properties)
98
+
99
+ delegate(*options[:readers], to: represented_object_name) if options.include?(:readers)
96
100
 
97
- if options.include?(:properties)
98
- delegate_properties(*options[:properties], to: represented_object_name)
101
+ if options.include?(:writers)
102
+ writers = options[:writers].map { |writer| "#{writer}=" }
103
+ delegate(*writers, to: represented_object_name)
99
104
  end
100
105
  end
101
106
 
@@ -1,3 +1,3 @@
1
1
  module ObjectAttorney
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: object_attorney
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gonçalves