Class: Mingle4r::CardFormat

Inherits:
Object
  • Object
show all
Defined in:
lib/mingle4r/card_format.rb

Instance Method Summary collapse

Instance Method Details

#decode(xml) ⇒ Object



11
12
13
14
15
# File 'lib/mingle4r/card_format.rb', line 11

def decode(xml)
  data = from_xml_data(Hash.from_xml(xml))
  convert_properties(data)
  data
end

#encode(hash, options = {}) ⇒ Object



17
18
19
20
# File 'lib/mingle4r/card_format.rb', line 17

def encode(hash, options={})
  options.merge! :dasherize => false
  hash.to_xml(options)
end

#extensionObject



3
4
5
# File 'lib/mingle4r/card_format.rb', line 3

def extension
  'xml'
end

#mime_typeObject



7
8
9
# File 'lib/mingle4r/card_format.rb', line 7

def mime_type
  'application/xml'
end