# File lib/active_resource/base.rb, line 894 def encode(options={}) case self.class.format when ActiveResource::Formats[:xml] self.class.format.encode(attributes, {:root => self.class.element_name}.merge(options)) else self.class.format.encode(attributes, options) end end