xmlregistry_objects 0.6.6 → 0.7.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: bd00b080aaee50bbbf23848e97e8b729ef06701f
4
- data.tar.gz: 29a5e4716e7cebc36032ba47156713942acb2e85
3
+ metadata.gz: 1e08026584bebc88eaae07633ece2f8ee13f96ae
4
+ data.tar.gz: 9f889c5413688467e481a1110577497a35ee41a3
5
5
  SHA512:
6
- metadata.gz: c2e4a08d1c6355dea7a6d6a8b7959d4896966eee8e0d03aae38863def02b8cb5194f1394b2e7e0d7cc6caf7d4a4bc5b0490460a745e1b4aff1fa1681a18b8056
7
- data.tar.gz: ea75804f910f95101798eb2c331e4f94c2b3de50452c0befdcf31bfee74fa717c860111104660e647c3fddccb07d4c0774eda681c4cf7151fee744238ac53639
6
+ metadata.gz: 8da96e60470b1215a37abe3696e8ae00e2ca9f7c90effc01d01bbd385cd445fc3716460d2237ec49893a7c97f9825a9f7cdc0b40b73f673991f7e45cdd9f0e5c
7
+ data.tar.gz: 9af6d1bb21138a40cfaf69368442a78dff5e1fd61ceab8024b301784ee3f98320d65ac212ac221a56b7e52d594037e8a499fd7ed3191aab043ef1b5543c443d5
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -69,7 +69,7 @@ class XMLRegistryObjects
69
69
  a = reg.xpath("#{path}/*")
70
70
 
71
71
  a.inject(base_methods) do |r, x|
72
-
72
+
73
73
  methods_name = subkey = x.name
74
74
  type = x.attributes[:class]
75
75
  key = path + '/' + subkey
@@ -91,6 +91,27 @@ class XMLRegistryObjects
91
91
  def define_methods()
92
92
  @to_h.each.map {|k,v| "define_method :#{k.to_s}, ->{h[:#{k}]}"}.join("\n")
93
93
  end
94
+
95
+ # to use this method the client is expect to fetch the
96
+ # hash object from the registry object e.g.
97
+ # xro = XMLRegistryObjects.new(reg,list)
98
+ # @h = xro.to_h
99
+
100
+ def define_methods2(obj=nil)
101
+
102
+ a = @to_h.each.map {|k,v| [k.to_s.to_sym, ->{@h[k.to_sym]} ] }
103
+
104
+ if obj then
105
+
106
+ a.each {|name, blk| obj.class.send(:define_method, name, blk) }
107
+
108
+ else
109
+
110
+ return a
111
+
112
+ end
113
+
114
+ end
94
115
 
95
116
  private
96
117
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlregistry_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -12,26 +12,26 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE0MDgyMDE3MTAwMFoXDTE1MDgyMDE3MTAwMFowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE1MDkwMzEyMzM1MVoXDTE2MDkwMjEyMzM1MVowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAMFQ3eeySg3868+QKzQJraCumSVD3C6nF4y4Dq9nuMy5TmX+4cqTWkE1l3xO
19
- LgGuNIW+yasu0x3RK2+U0g3pePqDYiey6Gk1h4mlWfuO+B2yNN52sN/4UW/WJ/zb
20
- EK/mdN6ChQ3f6AHYK4tPipsQQCjk21oT8y1rUPtr4X6YRpWUCgo35w5s4aLbEKOy
21
- PWDFYOh2QubFFcIdQUhmW1Cwm1Ku6r0XvdXaC/x9vmTkrLStS+bELncZORaUBbHQ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W+wIcWJC0CtpeJToFquRrvNgPoBlfX0b7w2BxRiR2Tutm
31
- wqxRKfbBOqXm+dGN+8ORUi9zTMOCo8Ga+cAbwYouf3Rzoq8gZMo6o1ZuAyEu1Vjl
32
- u2W9v1mcGY4/Vw==
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAT1NZWx3J
27
+ NNNOLRvx7/7LvpUOXLJq8SahlltoIJ8cCs3czhm4Ko21figVZPI5Uwtio4leaKNh
28
+ TanuC4LEzyzfBmfOIm2WmFuca5KpWmPCejYduXuL+vurOp+2/kUw366+wybwfJZ0
29
+ rvCj3WHF2uYG2FqK4k165mAcuXHtIbF7d97dEtrnd1n5geH1qUS863QfFKToBAx0
30
+ XvbgNbCcqf6JF97oJEiNw1dykfNTAfv0h1JjD9846HeXefNc5/XYyRzvUjHF9j85
31
+ BpU5TkIjxOcipB/2bKv68UjAwozv1G2sRg9dV99DUJZMcHKUees9fIht8adwrVWo
32
+ wrwWTUFBC2xYMA==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-04-18 00:00:00.000000000 Z
34
+ date: 2015-09-03 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dws-registry
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.6
103
+ rubygems_version: 2.4.8
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Query the registry using objects built dynamically from a string which maps
metadata.gz.sig CHANGED
Binary file