module KaveRestApi::NumberHelper

Public Instance Methods

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