lib/fushin/models/website.rb in fushin-0.2.0 vs lib/fushin/models/website.rb in fushin-0.3.0
- old
+ new
@@ -1,15 +1,17 @@
# frozen_string_literal: true
+require "embiggen"
require "digest/sha2"
require "uri"
module Fushin
module Models
class Website < Model
attr_reader :url
def initialize(url)
- @url = url
+ uri = Embiggen::URI(url)
+ @url = uri.expand.to_s
end
def uri
@uri ||= URI(url)
end