Sha256: f18987a17add85001fd11733c608a3e2d22008cf8dcf6365b2e71cbee614ad5e
Contents?: true
Size: 555 Bytes
Versions: 1
Compression:
Stored size: 555 Bytes
Contents
require 'httparty' require "smsc/sender" require "smsc/version" module Smsc class Sms attr_reader :login, :password, :charset def initialize(login, password, charset = 'utf-8') @login = login @password = password @charset = charset end def message(message, phones) message = message phones = phones.map { |p| p }.join(",") Smsc::Sender.post('https://smsc.ru/sys/send.php', :query => { :login => login, :psw => password, :phones => phones, :mes => message, :charset => charset }) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smsc-0.0.1 | lib/smsc.rb |