Module: RightResource::Formats::XmlFormat

Extended by:
XmlFormat
Included in:
XmlFormat
Defined in:
lib/right_resource/formats/xml_format.rb

Instance Method Summary collapse

Instance Method Details

#decode(xml) ⇒ Object



18
19
20
# File 'lib/right_resource/formats/xml_format.rb', line 18

def decode(xml)
  Crack::XML.parse(xml)
end

#encode(hash) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/right_resource/formats/xml_format.rb', line 14

def encode(hash)
  raise NotImplementedError, "Not Implementated function #{self.class.name}::#{__method__.to_s}"
end

#extensionObject



6
7
8
# File 'lib/right_resource/formats/xml_format.rb', line 6

def extension
  "xml"
end

#mime_typeObject



10
11
12
# File 'lib/right_resource/formats/xml_format.rb', line 10

def mime_type
  "application/xml"
end