summaryrefslogtreecommitdiff
path: root/contrib/smsweb/smswsc/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/smsweb/smswsc/builder.rb')
-rw-r--r--contrib/smsweb/smswsc/builder.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/smsweb/smswsc/builder.rb b/contrib/smsweb/smswsc/builder.rb
new file mode 100644
index 0000000..a6e25a9
--- /dev/null
+++ b/contrib/smsweb/smswsc/builder.rb
@@ -0,0 +1,23 @@
+require 'builder'
+
+module SMSWSC
+ XmlOptions = {
+ :version => "1.0",
+ :encoding => "UTF-8",
+ :indent => 0,
+ }
+
+ def self.new_builder(xml)
+ builder = Builder::XmlMarkup.new(
+ :target => xml,
+ :indent => SMSWSC::XmlOptions[:indent]
+ )
+ builder.instruct!(
+ :xml,
+ :version => SMSWSC::XmlOptions[:version],
+ :encoding => SMSWSC::XmlOptions[:encoding]
+ )
+
+ return builder
+ end
+end