xml-registry 0.2.2 → 0.2.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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 777b107229bcfaa59fc56dff72416e8d571aac76
4
- data.tar.gz: c534a0ac4bf095ba5e7649d5efccd927b477749a
3
+ metadata.gz: 14f2ebebb08879ad4723797e88e9e0f076796511
4
+ data.tar.gz: 04f5cb77e74192564151d908cf20ec2cd155aa64
5
5
  SHA512:
6
- metadata.gz: c47aba43f009170009e44d8886590b586ec128d761e0060d4710126dd0c041d923852b84811fdfd041bfc3420ae13b0a52fa319b0ad3c5ea6afcdf72315319cb
7
- data.tar.gz: 9e856f4959562a363106f75fb75e9cb59d9a098ccf968a999f1be94c35e6eced75fb6b0c2ec2e3a0d8b9d5bd58ff193939b4411cf910c415d100ce60f0b07939
6
+ metadata.gz: 798108ab93c4ee2c8a2f0571dfdeff6471021b6f9b07594847a2096dbd1bb2034cd7e96b165abf6325f5abe9adba0cc92fda4ca1fb2831332c3c6cfda05367e9
7
+ data.tar.gz: a56e8a16812f1133839437d8b86927af17b8c086da107b7bd7536267b7939f27c27bf4eaf0129e3bb93a2d2f85aed2853aaca5d279c71902ed0413c2e5d2bd3c
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1 @@
1
- }X �ݨ
2
- Wk�Ŷ6�S������,F�\� �3�������o�$m��`
3
- O�w��5�L~O=��!W���ZF�W�$���R���R���X�R�6�L�Db��:���X��*���k����6i���Z�y�-�.8�%6w�v��E񪦈�-VI��)�a�)J��mO.�UM�((iZi��˅�N}t��"
1
+ `���jim .�Qq�֕sB��}�wN���� M�>����� Q:��R��}؆ F�c�c�tG jr��#Z��۲)���=�D�-@�p�%����/���j �S���{Qm5cg�j��;����n�Ht�1��8t�Q$��D
data/lib/xml-registry.rb CHANGED
@@ -43,8 +43,8 @@ class XMLRegistry
43
43
  add_value(path, value)
44
44
  end
45
45
 
46
- def key[]=(path, val)
47
- self.set_key key, val
46
+ def []=(path, val)
47
+ self.set_key(path, val)
48
48
  end
49
49
 
50
50
  # get the key value by passing the path
@@ -57,10 +57,6 @@ class XMLRegistry
57
57
  raise ("xml-registry: key %s not found" % path) unless key
58
58
  key
59
59
  end
60
-
61
- def key[](path)
62
- self.doc.root.element path
63
- end
64
60
 
65
61
  # get several keys using a Rexle XPath
66
62
  # example: get_key('//funday') #=> [<funday>tuesday</funday>,<funday>friday</funday>]
@@ -68,11 +64,11 @@ class XMLRegistry
68
64
  # returns an array of 0 or more Rexle elements
69
65
  #
70
66
  def get_keys(path)
71
- @doc.root.xpath path
67
+ @doc.root.xpath(path)
72
68
  end
73
69
 
74
- def keys[](path)
75
- self.get_keys path
70
+ def [](path)
71
+ @doc.root.element path
76
72
  end
77
73
 
78
74
  # delete the key at the specified path
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file