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(json) ⇒ Object



20
21
22
# File 'lib/right_resource/formats/xml_format.rb', line 20

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

#encode(hash) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/right_resource/formats/xml_format.rb', line 16

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

#extensionObject



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

def extension
  "xml"
end

#mime_typeObject



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

def mime_type
  "application/xml"
end