class CPEE::Properties::GetPositions

Public Instance Methods

response() click to toggle source
# File lib/cpee/implementation_properties.rb, line 497
def response
  id = @a[0]
  opts = @a[1]
  doc = XML::Smart::open_unprotected(opts[:properties_empty])
  doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
  des = doc.find("/p:properties/p:positions").first
  CPEE::Persistence::extract_set(id,opts,'positions').each do |de|
    node = des.add(*de)
    if pt = CPEE::Persistence::extract_item(id,opts,File.join('positions',de[0],'@passthrough'))
      node.attributes['passthrough'] = pt
    end
  end
  Riddl::Parameter::Complex.new('positions','text/xml',des.to_doc.to_s)
end