Changeset 1587
- Timestamp:
- 07/22/05 21:53:43 (3 years ago)
- Files:
-
- trunk/lib/soap/generator.rb (modified) (5 diffs)
- trunk/lib/soap/rpc/proxy.rb (modified) (1 diff)
- trunk/test/soap/test_no_indent.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/generator.rb
r1580 r1587 39 39 @elementformdefault = opt[:elementformdefault] 40 40 @attributeformdefault = opt[:attributeformdefault] 41 @indentstr = opt[:no_indent] ? '' : ' ' 41 42 @buf = @indent = @curr = nil 42 43 end … … 100 101 101 102 def encode_child(ns, child, parent) 102 indent_backup, @indent = @indent, @indent + ' '103 indent_backup, @indent = @indent, @indent + @indentstr 103 104 encode_data(ns.clone_ns, child, parent) 104 105 @indent = indent_backup … … 110 111 @reftarget = obj 111 112 obj.encode(self, ns, attrs) do |child| 112 indent_backup, @indent = @indent, @indent + ' '113 indent_backup, @indent = @indent, @indent + @indentstr 113 114 encode_data(ns.clone_ns, child, obj) 114 115 @indent = indent_backup … … 125 126 end 126 127 obj.encode(self, ns, attrs) do |child| 127 indent_backup, @indent = @indent, @indent + ' '128 indent_backup, @indent = @indent, @indent + @indentstr 128 129 encode_data(ns.clone_ns, child, obj) 129 130 @indent = indent_backup … … 163 164 attrs.collect { |key, value| 164 165 %Q[#{ key }="#{ value }"] 165 }.join("\n#{ @indent } ") <<166 }.join("\n#{ @indent }#{ @indentstr * 2 }") << 166 167 '>' 167 168 end trunk/lib/soap/rpc/proxy.rb
r1581 r1587 251 251 opt[:allow_unqualified_element] = @allow_unqualified_element 252 252 opt[:generate_explicit_type] = @generate_explicit_type 253 opt[:no_indent] = @options["soap.envelope.no_indent"] 253 254 opt.update(hash) if hash 254 255 opt