server/lib/cimi/service/base.rb
# FIXME: Kludge around the fact that we do not have proper *Create
# objects that deserialize properties by themselves
Kludge around the fact that we do not have proper *Create
objects that deserialize properties by themselves
Kludge around the fact that we do not have proper * Create objects that deserialize properties by themselves
def extract_properties!(data)
      h = {}
      if data['property']
        h = data['property'].inject({}) do |r,v|
          r[v['key']] = v['content']
          r
        end
      elsif data['properties']
        h = data['properties']
      end
      property ||= {}
      property.merge!(h)
    end
def extract_properties! ( data ) h = { } if data [ 'property' ] h = data [ 'property' ] . inject ( { } ) do | r , v | r [ v [ 'key' ] ] = v [ 'content' ] r end elsif data [ 'properties' ] h = data [ 'properties' ] end property ||= { } property . merge! ( h ) end
FIXME: Kludge around the fact that we do not have proper *Create
objects that deserialize properties by themselves
FIXME : Kludge around the fact that we do not have proper * Create objects that deserialize properties by themselves
# Data came from XML
data
<not_specific>