roundtrip_xml 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/roundtrip_xml/utils.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 837446922a72a4d92249814fe7bec2fb18e55dc0
4
- data.tar.gz: 6af402ef91841731f91fe4c1150af64d45a7771c
3
+ metadata.gz: f9b79a0813996da5f073644d1a94a4e11c599bf9
4
+ data.tar.gz: bae4ec579f5b87b8196e5c428b38ac6d128e31cf
5
5
  SHA512:
6
- metadata.gz: e59793454906333759cf2ff2f12b894d730a3d1d2f5f20b5638d3bdc84d8253b8859e4f4da2ff8d6da70bd02bd96c86df50220702bd6c80b5043fe5a61abdcaf
7
- data.tar.gz: 5c3be5cffe092a19e64b125a9e96ce003fbf3732369723b92ed78b6345404b9def15c18879d271a37a7c60318a05da7ed0d1dbc95e81c55e5ebeb368d8e44185
6
+ metadata.gz: 00281f90df20395e342a3f87273548e3f41137484dff8331f43be1669bffddf964a8982580b10c97d10e2b75cca5578f4559de6aab9a9480208c5b03ade4fa28
7
+ data.tar.gz: 29ee80d67d6a843a8c620ba1b48c7344feb3c7ef73e1ae36df2018bc8faa9df946a92f600c4d9dc4fb444930bfae0f5c64fbce2305165db81659d0b69ce18b12
@@ -31,7 +31,7 @@ module Utils
31
31
  include ROXML
32
32
  include PlainAccessors
33
33
  xml_convention :dasherize
34
- xml_name name
34
+ xml_name parent.respond_to?(:tag_name) ? parent.tag_name : name
35
35
 
36
36
  # by default a ROXML class isn't a sub class
37
37
  def self.subclass?
@@ -42,7 +42,7 @@ module Utils
42
42
  end
43
43
 
44
44
  def self.class_name
45
- self.tag_name.is_a?(Symbol) ? self.tag_name : name_to_sym_helper(self.tag_name)
45
+ @class_name || name_to_sym_helper(self.tag_name)
46
46
  end
47
47
 
48
48
  def to_hash
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Usick