lib/textmagic/validation.rb in textmagic-0.6.0 vs lib/textmagic/validation.rb in textmagic-0.7.0
- old
+ new
@@ -2,12 +2,12 @@
class API
module Validation
- MAX_LENGTH_GSM = [160, 306, 459]
- MAX_LENGTH_UNICODE = [70, 134, 201]
+ MAX_LENGTH_GSM = [160, 306, 459].freeze
+ MAX_LENGTH_UNICODE = [70, 134, 201].freeze
# Validates message text length. Returns +true+ if the text length is
# within the limits for the unicode/parts combination, otherwise it
# returns +false+.
#
@@ -27,8 +27,11 @@
phones.flatten!
return false if phones.empty?
phones.each { |phone| return false unless phone =~ /^\d{1,15}$/ }
true
end
+
end
+
end
+
end