Class: Smartfm::Notification

Inherits:
Base
  • Object
show all
Includes:
PrivateContent
Defined in:
lib/smartfm/models/notification.rb

Constant Summary collapse

ATTRIBUTES =
[:type, :message, :recipient, :sender, :context]
READONLY_ATTRIBUTES =
[:type, :recipient, :sender, :context]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from PrivateContent

included

Methods inherited from Base

attributes, #attributes

Constructor Details

#initialize(params) ⇒ Notification

Returns a new instance of Notification.



12
13
14
15
16
17
18
# File 'lib/smartfm/models/notification.rb', line 12

def initialize(params)
  @type      = params[:type]
  @message   = params[:message]
  @recipient = params[:recipient]
  @sender    = params[:sender]
  @context   = params[:context]
end

Class Method Details

.rest_clientObject



9
# File 'lib/smartfm/models/notification.rb', line 9

def self.rest_client; Smartfm::RestClient::Notification; end

Instance Method Details

#rest_clientObject



10
# File 'lib/smartfm/models/notification.rb', line 10

def rest_client; self.class.rest_client; end