acdc 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ class Boolean; end
11
11
  module AcDc
12
12
 
13
13
  DEFAULT_NAMESPACE = "acdc"
14
- VERSION = [0,7,5]
14
+ VERSION = [0,7,6]
15
15
 
16
16
  def self.parseable_constants
17
17
  @parseables ||= []
@@ -16,7 +16,9 @@ module AcDc
16
16
  if value
17
17
  if elem.single?
18
18
  if elem.primitive?
19
- body.tag! elem.tag, value
19
+ unless value.is_a?(String) and value.empty? and !elem.renderable?
20
+ body.tag! elem.tag, value
21
+ end
20
22
  else
21
23
  body << value.acdc(false)
22
24
  end
@@ -33,6 +35,9 @@ module AcDc
33
35
  body.tag! elem.tag if elem.renderable?
34
36
  end
35
37
  end
38
+ if is_a?(AcDc::Body) and value
39
+ body << value
40
+ end
36
41
  }
37
42
  xml.target!
38
43
  end
@@ -35,11 +35,14 @@ module AcDc
35
35
  klass.elements.each do |elem|
36
36
  obj.send("#{elem.method_name}=", elem.value_from_xml(node, namespace))
37
37
  end
38
- else
39
- obj.value = node.respond_to?(:content) ? node.content : node.to_s
40
38
  end
41
39
 
42
- obj
40
+ if obj.is_a?(AcDc::Body)
41
+ obj.value = node.respond_to?(:content) ? node.content : node.to_s
42
+ end
43
+
44
+ obj
45
+
43
46
  end
44
47
 
45
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clint Hill
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-16 00:00:00 -07:00
12
+ date: 2010-01-29 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -78,6 +78,6 @@ rubyforge_project:
78
78
  rubygems_version: 1.3.5
79
79
  signing_key:
80
80
  specification_version: 3
81
- summary: acdc 0.7.5
81
+ summary: acdc 0.7.6
82
82
  test_files: []
83
83