Class: HerokuNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/heroku_notification/base.rb

Class Method Summary collapse

Class Method Details

.post(params = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/heroku_notification/base.rb', line 3

def self.post(params = {})
  if !params[:to].is_a?(String) && params[:to].respond_to?(:id)
    params[:id] = params[:to].id
    params[:to] = params[:to].class.to_s.downcase
  elsif params[:to].is_a?(Symbol)
    params[:to] = params[:to].to_s
  end
  RestClient.post(url + '/notifications', params)
end