Used internally by the Polyrex gem to create new Polyrex records.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
MIT-LICENSE
README.md
gem-public_cert.pem
polyrex-createobject.gemspec

README.md

A Polyrex-createobject example

require 'requestor'

eval Requestor.read('http://rorbuilder.info/r/ruby/') {|x| x.require 'polyrex-createobject' }

obj = PolyrexCreateObject.new('a/b[name]/c[name,count]/d[name,age]')
doc = Rexle.new('<a><summary/><records><b><summary><name>123</name></summary><records></records></b></records></a>')
obj.record = doc.root
obj.b(name: 'fun') do |create|
  create.c(name: 'fun5') do |create|
    create.d name: 'fun7', age: 11
  end
end

puts doc.to_s pretty: true

  
  
    
      
        123
      
      
    
    
      
        fun
        [!name]
        polyrex
        b[name]
      
      
        
          
            fun5
            
            [!name] [!count]
            polyrex
            c[name,count]
          
          
            
              
                fun7
                11
                [!name] [!age]
                polyrex
                d[name,age]
              
              
            
          
        
      
    
  

polyrex polyrexcreateobject gem testing