Class: OpenPayU::XmlBuilder
- Inherits:
-
Builder::XmlMarkup
- Object
- Builder::XmlMarkup
- OpenPayU::XmlBuilder
- Defined in:
- lib/openpayu/xml_builder.rb
Instance Method Summary (collapse)
-
- (XmlBuilder) initialize(req_type, options = {})
constructor
A new instance of XmlBuilder.
- - (Object) tag!(sym, *args, &block)
Constructor Details
- (XmlBuilder) initialize(req_type, options = {})
Returns a new instance of XmlBuilder
7 8 9 10 |
# File 'lib/openpayu/xml_builder.rb', line 7 def initialize(req_type, = {}) @req_type = req_type super() end |
Instance Method Details
- (Object) tag!(sym, *args, &block)
12 13 14 15 16 17 18 19 20 |
# File 'lib/openpayu/xml_builder.rb', line 12 def tag!(sym, *args, &block) if @level == 0 # Root element args << { 'xsi:type' => @req_type, 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' } end super(sym, *args, &block) end |