NO JIRA: Updated the documentation for the Ruby Message class.

Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/5521a7ec
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/5521a7ec
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/5521a7ec

Branch: refs/heads/examples
Commit: 5521a7ec68622492cea687ab4df9903ac2f20ce2
Parents: 6371e9e
Author: Darryl L. Pierce <[email protected]>
Authored: Mon Nov 10 15:33:26 2014 -0500
Committer: Darryl L. Pierce <[email protected]>
Committed: Mon Nov 10 16:15:04 2014 -0500

----------------------------------------------------------------------
 .../bindings/ruby/lib/qpid_proton/message.rb    | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5521a7ec/proton-c/bindings/ruby/lib/qpid_proton/message.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/qpid_proton/message.rb 
b/proton-c/bindings/ruby/lib/qpid_proton/message.rb
index d840299..b7a4fd0 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton/message.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton/message.rb
@@ -23,8 +23,24 @@ module Qpid
 
     # A Message represents an addressable quantity of data.
     #
+    # ==== Message Body
+    #
+    # The message body can be set using the #body= method. The message will
+    # then attempt to determine how exactly to encode the content.
+    #
     # ==== Examples
     #
+    # To create a message for sending:
+    #
+    #   # send a simple text message
+    #   msg = Qpid::Proton::Message.new
+    #   msg.body = "STATE: update"
+    #
+    #   # send a binary chunk of data
+    #   data = File.binread("/home/qpid/binfile.tar.gz")
+    #   msg = Qpid::Proton::Message.new
+    #   msg.body = Qpid::Proton::BinaryString.new(data)
+    #
     class Message
 
       # Decodes a message from supplied AMQP data and returns the number
@@ -372,6 +388,8 @@ module Qpid
       #
       # See MessageFormat for more details on formats.
       #
+      # *Warning:* This method has been deprecated.
+      #
       # ==== Options
       #
       # * format - the format
@@ -383,6 +401,12 @@ module Qpid
 
       # Returns the message format
       #
+      # *Warning:* This method has been deprecated.
+      #
+      # ==== Note
+      #
+      # This method is now deprecated.
+      #
       def format
         
Qpid::Proton::MessageFormat.by_value(Cproton.pn_message_get_format(@impl))
       end


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to