Class: CPEE::Notifications::DeleteSubscription

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation_notifications.rb

Overview

}}}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set(id, opts, key) ⇒ Object

{{{



168
169
170
# File 'lib/cpee/implementation_notifications.rb', line 168

def self::set(id,opts,key)
  CPEE::Persistence::set_handler(id,opts,key,"",[],true)
end

Instance Method Details

#responseObject



172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/cpee/implementation_notifications.rb', line 172

def response
  id = @a[0]
  opts = @a[1]
  key = @r.last

  if CPEE::Persistence::exists_handler?(id,opts,key)
    DeleteSubscription::set(id,opts,key)
  else
    @status = 404
  end
  nil
end