module KaveRestApi::NumberHelper
Public Instance Methods
ctpd()
click to toggle source
# File lib/kavenegar-ruby/helpers/convertor.rb, line 4 def ctpd return self.to_s.tr('0123456789','۰١۲۳۴۵۶۷۸۹') end
is_phone?()
click to toggle source
# File lib/kavenegar-ruby/helpers/validator.rb, line 5 def is_phone? return !!self.match(/^(09{1})+([1-3]{1})+(\d{8})$/) end