Qpid Proton
  1. Qpid Proton
  2. PROTON-322

Extend the native Ruby array and hash classes to work with the Data type

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Component/s: proton-c
    • Labels:
      None

      Description

      Currently Ruby developers have to explicitly create instances of either Qpid::Proton::Data::List, Qpid::Proton::Data::Array or Qpid::Proton::Data::Map to get access to helper methods for interaction with Qpid::Proton::Data. But this too tightly couples the user to Proton-specific code for non-messaging related functions.

      Instead, we should leverage Ruby metaprogramming and add the needed functions to the standard Ruby classes directly. That way developers wouldn't need to refactor existing code to work with Proton.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1488342 from mcpierce
        [ https://svn.apache.org/r1488342 ]

        PROTON-322: Extended the Ruby Array class to work with the Data class.

        Added attributes for setting the Proton type and description for
        encoding an entire array as a described Array. If the type isn't set
        then the array is added as an AMQP List instead.

        Show
        ASF subversion and git services added a comment - Commit 1488342 from mcpierce [ https://svn.apache.org/r1488342 ] PROTON-322 : Extended the Ruby Array class to work with the Data class. Added attributes for setting the Proton type and description for encoding an entire array as a described Array. If the type isn't set then the array is added as an AMQP List instead.
        Hide
        ASF subversion and git services added a comment -

        Commit 1490429 from Darryl L. Pierce
        [ https://svn.apache.org/r1490429 ]

        PROTON-322: Extend the Ruby Hash class to work with the Data class.

        Adds the proton_data_put and proton_data_get methods to the Hash class
        for Ruby. When passed an instance of Qpid::Proton::Data it marshals the
        contents of the Hash, encoding the values properly.

        Show
        ASF subversion and git services added a comment - Commit 1490429 from Darryl L. Pierce [ https://svn.apache.org/r1490429 ] PROTON-322 : Extend the Ruby Hash class to work with the Data class. Adds the proton_data_put and proton_data_get methods to the Hash class for Ruby. When passed an instance of Qpid::Proton::Data it marshals the contents of the Hash, encoding the values properly.

          People

          • Assignee:
            Darryl L. Pierce
            Reporter:
            Darryl L. Pierce
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development