Method: Messaging::Channels::Messenger#initialize
- Defined in:
- lib/vonage/messaging/channels/messenger.rb
#initialize(attributes = {}) ⇒ Messenger
Returns a new instance of Messenger.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/vonage/messaging/channels/messenger.rb', line 9 def initialize(attributes = {}) @to = attributes.fetch(:to, nil) @from = attributes.fetch(:from, nil) @type = attributes.fetch(:type, nil) = attributes.fetch(:message, nil) @opts = attributes.fetch(:opts, {}) @data = {} after_initialize! end |