Method: CPEE::Properties::PatchPositions.set

Defined in:
lib/cpee/implementation_properties.rb

.set(id, opts, xml) ⇒ Object

{{{



512
513
514
515
516
517
518
519
520
521
522
# File 'lib/cpee/implementation_properties.rb', line 512

def self::set(id,opts,xml)
  doc = XML::Smart::string(xml)
  content = {}
  doc.find("/*/*").map do |ele|
    val = { 'position' => ele.qname.name }
    val['passthrough'] = ele.attributes['passthrough'] if ele.attributes['passthrough']
    content[ele.text] ||= []
    content[ele.text] << val
  end
  CPEE::Persistence::set_item(id,opts,'position',content)
end