private Method

XmlMarkup._insert_attributes(attrs, order=[])

Insert the attributes (given in the hash).

Source Code

# File builder/xmlmarkup.rb, line 299
def _insert_attributes(attrs, order=[])
  return if attrs.nil?
  order.each do |k|
    v = attrs[k]
    @target << %{ #{k}="#{_attr_value(v)}"} if v # " WART
  end
  attrs.each do |k, v|
    @target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART
  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.