roundtrip_xml 1.0.5 → 1.1.0

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: 37d545287ba08b0a357bf45d9d728b8d146430fd
4
- data.tar.gz: c6e5f786be6e7a7dfd54cfbe0862fcba3b5e0738
3
+ metadata.gz: 6d353e1be5b928524c4e94ad5caf990d279c2773
4
+ data.tar.gz: 5ec3cb5d5b0d4d8f72c1befd6969b0eea45148a4
5
5
  SHA512:
6
- metadata.gz: d4ec5b16038e98f980f22a3147139fae60d51ae7c8ee558d0599e35137b890a8bf8a1c48ace92e98a79dd397bc634cf5f9c6db1a2704c96a5dd43c882ca1d465
7
- data.tar.gz: 3782e8b972a5285f0ed61b0678c3ecc019533be2adedca94b59758555d7b3819d1b57113f53059bd0dec1e62e5d08a77c92041366fa94721cfcd4a5005eb6580
6
+ metadata.gz: 779f7cd08f879da508b3b367136d01243284c75c43430b2666fad5ac7a56464ddecd7d3d1c26cac1aeca70b182bdec20c49da7e40294025038cddc63535241ac
7
+ data.tar.gz: 525538e4d2d219cf81749fba0863dff4071be35991f6cf37a9ba8c861d5875f01754afd1966d048fc9b035683489e6e3e4e7ba0e19c78f6155168faa90164b82
@@ -57,6 +57,11 @@ class BaseCleanroom
57
57
  self.class.send(:define_method, name, &block)
58
58
  end
59
59
 
60
+ def _metadata(hash)
61
+ get_el._metadata = get_el._metadata.merge hash
62
+ end
63
+ expose :_metadata
64
+
60
65
  def expand(clazz, &block)
61
66
  plain_accessors = @el.class.plain_accessors
62
67
  @value_holder ||= {}
@@ -30,6 +30,10 @@ module Utils
30
30
  Class.new(parent) do
31
31
  include ROXML
32
32
  include PlainAccessors
33
+ attr_writer :_metadata
34
+ def _metadata
35
+ @_metadata || {}
36
+ end
33
37
  xml_convention :dasherize
34
38
  xml_name parent.respond_to?(:tag_name) ? parent.tag_name : name
35
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roundtrip_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Usick