Class: Intacct::Functions::Create
- Inherits:
-
Object
- Object
- Intacct::Functions::Create
- Defined in:
- lib/intacct/functions/create.rb
Instance Method Summary collapse
-
#initialize(record_type, &block) ⇒ Create
constructor
A new instance of Create.
- #to_xml ⇒ Object
Constructor Details
#initialize(record_type, &block) ⇒ Create
Returns a new instance of Create.
6 7 8 9 |
# File 'lib/intacct/functions/create.rb', line 6 def initialize(record_type, &block) @record_type = record_type @block = block end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/intacct/functions/create.rb', line 11 def to_xml builder = Builder::XmlMarkup.new builder.create do builder.tag!(@record_type) do @block.call(builder) end end end |