Sha256: 2bfc4fcb323e109675c7dc3cab7f0bd73ff03f13faae503e2d236a1d7bbd86d3
Contents?: true
Size: 1.18 KB
Versions: 5
Compression:
Stored size: 1.18 KB
Contents
require "om/xml/container" require "om/xml/accessors" require "om/xml/validation" require "om/xml/properties" require "om/xml/property_value_operators" require "om/xml/generator" module OM::XML attr_accessor :ng_xml # Class Methods -- These methods will be available on classes that include this Module module ClassMethods # @pointer accessor or property info pointer # # ex. [[:person,1],:role] will be converted to [{:person=>1},:role] 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 end # Instance Methods -- These methods will be available on instances of classes that include this module def self.included(klass) klass.extend(ClassMethods) klass.send(:include, OM::XML::Container) klass.send(:include, OM::XML::Accessors) klass.send(:include, OM::XML::Validation) klass.send(:include, OM::XML::Properties) klass.send(:include, OM::XML::PropertyValueOperators) klass.send(:include, OM::XML::Generator) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
om-0.1.10 | lib/om/xml.rb |
om-0.1.9 | lib/om/xml.rb |
om-0.1.8 | lib/om/xml.rb |
om-0.1.7 | lib/om/xml.rb |
om-0.1.6 | lib/om/xml.rb |