class CPEE::Notifications::CreateSubscription
Public Instance Methods
response()
click to toggle source
# File lib/cpee/implementation_notifications.rb, line 126 def response id = @a[0] opts = @a[1] key = @p[0].name == 'id' ? @p.shift.value : Digest::MD5.hexdigest(Kernel::rand().to_s) url = @p[0].name == 'url' ? @p.shift.value : nil values = [] while @p.length > 0 topic = @p.shift.value base = @p.shift type = base.name values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) } end @header = CPEE::Persistence::set_handler(id,opts,key,url,values) Riddl::Parameter::Simple.new('key',key) end