public Method

SOAPGenerator.encode_tag(elename, attrs = nil)

There's no documentation for this item.

Source Code

# File soap/generator.rb, line 158
def encode_tag(elename, attrs = nil)
  if !attrs or attrs.empty?
    @buf << "\n#{ @indent }<#{ elename }>"
  elsif attrs.size == 1
    key, value = attrs.shift
    @buf << %Q[\n#{ @indent }<#{ elename } #{ key }="#{ value }">]
  else
    @buf << "\n#{ @indent }<#{ elename } " <<
      attrs.collect { |key, value|
        %Q[#{ key }="#{ value }"]
      }.join("\n#{ @indent }#{ @indentstr * 2 }") <<
      '>'
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.