Class: KannelRails::Handlers::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
# File 'lib/kannel_rails/handlers/base.rb', line 5

def initialize(params)
  self.params = params
  self.sender = params[:from]
  self.message = params[:text]
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/kannel_rails/handlers/base.rb', line 3

def message
  @message
end

#paramsObject

Returns the value of attribute params.



3
4
5
# File 'lib/kannel_rails/handlers/base.rb', line 3

def params
  @params
end

#senderObject

Returns the value of attribute sender.



3
4
5
# File 'lib/kannel_rails/handlers/base.rb', line 3

def sender
  @sender
end

Instance Method Details

#handle?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/kannel_rails/handlers/base.rb', line 11

def handle?
  raise "Please override this method!"
end

#invokeObject



15
16
17
# File 'lib/kannel_rails/handlers/base.rb', line 15

def invoke
  raise "Please override this method!"
end