module MyMoip::Validators
Private Instance Methods
valid_url?(url)
click to toggle source
# File lib/mymoip/validators.rb, line 5 def valid_url?(url) uri = URI.parse(url) uri.kind_of?(URI::HTTP) or uri.kind_of?(URI::HTTPS) rescue URI::InvalidURIError false end