class Hulaki::Nexmo
Attributes
client[R]
from[R]
message[R]
to[R]
Public Class Methods
new(params = {})
click to toggle source
# File lib/hulaki/sms_handler/gateway_adapters/nexmo.rb, line 6 def initialize(params = {}) @to = params[:to] @message = params[:message] @config = params[:config] @from = params.fetch(:from, @config['from']) return true if ENV['mode'] == 'test' @client = Nexmo::Client.new(key: @config['API_KEY'], secret: @config['API_SECRET']) end
Public Instance Methods
send()
click to toggle source
# File lib/hulaki/sms_handler/gateway_adapters/nexmo.rb, line 17 def send return true if ENV['mode'] == 'test' client.send_message(from: from, to: to, text: message) end