module Coolsms
Constants
- NUMBER_STRIP_REGEX
- TIMEZONE
- VERSION
Public Class Methods
configure() { |self| ... }
click to toggle source
# File lib/coolsms.rb, line 34 def configure yield(self) end
message(text, *to) { |msg| ... }
click to toggle source
# File lib/coolsms.rb, line 38 def message(text, *to) options = to.extract_options! options[:text] = text options[:from] ||= default_from msg = Coolsms::Message.new(options) if block_given? yield(msg) else msg.send(*to) end msg end
number_strip(str)
click to toggle source
# File lib/coolsms.rb, line 30 def number_strip(str) str.gsub(NUMBER_STRIP_REGEX, '') end