diff options
author | James Maki <jmaki@multitech.com> | 2010-05-10 14:26:36 -0500 |
---|---|---|
committer | James Maki <jmaki@multitech.com> | 2010-05-10 14:26:36 -0500 |
commit | 9ba8adf164b316a3d6914b3b187f371f6e19066d (patch) | |
tree | cc4579c4141b42ed51cd25a4beb1ae733d8f03ac /contrib/smsweb/smswsc/builder.rb | |
parent | 088fee0dd65a2d11dfac58afec8871b3a3cfc376 (diff) | |
download | sms-utils-9ba8adf164b316a3d6914b3b187f371f6e19066d.tar.gz sms-utils-9ba8adf164b316a3d6914b3b187f371f6e19066d.tar.bz2 sms-utils-9ba8adf164b316a3d6914b3b187f371f6e19066d.zip |
Add sms web service example0.0.3
Diffstat (limited to 'contrib/smsweb/smswsc/builder.rb')
-rw-r--r-- | contrib/smsweb/smswsc/builder.rb | 23 |
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 |