lib/zenvia/sms.rb in zenvia-rb-0.0.3 vs lib/zenvia/sms.rb in zenvia-rb-0.0.4

- old
+ new

@@ -7,10 +7,10 @@ # initiate SMS object with # from: user or enterprise name, number: receiver number, message: text def initialize(from = nil, number, message) @from = from.nil? ? Zenvia.config.name : from @number = number - exit puts 'The number must be composed with just numbers' unless /\d*/.match(@number) + exit puts 'letters and other special chars are not accepted in number parameter' unless /^\d*$/.match(@number) @message = message end def send_message response = send_sms \ No newline at end of file