# File lib/openshift-origin-common/models/model.rb, line 15 def attributes a = {} self.instance_variable_names.each do |name| a[name[1..-1]] = self.instance_variable_get(name) end a end
# File lib/openshift-origin-common/models/model.rb, line 23 def to_xml(options = {}) to_xml_opts = {:skip_types => true} to_xml_opts.merge!(options.slice(:builder, :skip_instruct)) to_xml_opts[:root] = options[:tag_name] || self.class.name.underscore.gsub("_","-") self.attributes.to_xml(to_xml_opts) end