Module: SimpleMapper::XmlFormat

Defined in:
lib/simple_mapper/formats/xml_format.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
# File 'lib/simple_mapper/formats/xml_format.rb', line 8

def self.included(base)
  base.extend ClassMethods
end

.mime_type_headersObject



12
13
14
# File 'lib/simple_mapper/formats/xml_format.rb', line 12

def self.mime_type_headers
  {'Accept' => 'application/xml', 'Content-type' => 'application/xml'}
end

Instance Method Details

#to_xmlObject



16
17
18
19
20
# File 'lib/simple_mapper/formats/xml_format.rb', line 16

def to_xml
  xml = Serialize.object_to_xml(self, :key_name => 'self').to_s
  # puts "POST XML: #{xml}"
  xml
end