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