class Parkeon::Builder
Attributes
method_name[RW]
Public Class Methods
build(method_name, &block)
click to toggle source
# File lib/parkeon/builder.rb, line 4 def self.build(method_name, &block) new(method_name).build(&block) end
new(method_name)
click to toggle source
# File lib/parkeon/builder.rb, line 8 def initialize(method_name) @method_name = method_name end
Public Instance Methods
build(&block)
click to toggle source
# File lib/parkeon/builder.rb, line 12 def build(&block) Nokogiri::XML::Builder.new do |xml| xml.methodCall { xml.methodName method_name xml.params { xml.param { xml.value { xml.struct { block.call(xml) } } } } } end.to_xml end