class UrlAttribute::NormalizedUrl
Public Class Methods
new(url)
click to toggle source
Calls superclass method
# File lib/url_attribute/normalized_url.rb, line 3 def initialize(url) super if @uri && @uri.scheme.blank? @uri = URI.parse("http://#{url}") @url = @uri.to_s end rescue URI::InvalidURIError end