class CPEE::Notifications::Subscriptions

Public Instance Methods

response() click to toggle source
# File lib/cpee/implementation_notifications.rb, line 72
      def response
        id = @a[0]
        opts = @a[1]
        Riddl::Parameter::Complex.new("subscriptions","text/xml") do
          ret = XML::Smart::string <<-END
            <subscriptions xmlns='http://riddl.org/ns/common-patterns/notifications-producer/2.0'/>
          END
          CPEE::Persistence::extract_handlers(id,opts).each do |de|
            ret.root.add('subscription').tap do |n|
              n.attributes['id'] = de[0]
              n.attributes['url'] = de[1] if de[1] && !de[1].empty?
            end
          end
          ret.to_s
        end
      end