Module: OM::XML::ClassMethods

Defined in:
lib/om/xml.rb

Overview

Class Methods – These methods will be available on classes that include this Module

Instance Method Summary collapse

Instance Method Details

#sanitize_pointer(pointer) ⇒ Object

Examples:

[[:person,1],:role] #=> [{:person=>1},:role]

Parameters:

  • pointer

    accessor or property info pointer



36
37
38
39
40
41
42
43
44
45
# File 'lib/om/xml.rb', line 36

def sanitize_pointer(pointer) 
  if pointer.kind_of?(Array)        
    pointer.each do |x|
      if x.kind_of?(Array)
        pointer[pointer.index(x)] = Hash[x[0],x[1]] 
      end
    end
  end
  return pointer
end