class MagicLink::URL
Public Class Methods
new(string)
click to toggle source
# File lib/magic_link/url.rb, line 3 def initialize(string) @string = string end
Public Instance Methods
to_url()
click to toggle source
# File lib/magic_link/url.rb, line 7 def to_url @string =~ /^http/ ? @string : "http://#{@string}" end