Method: CMSScanner::WebSite#url
- Defined in:
- lib/cms_scanner/web_site.rb
#url(path = nil) ⇒ String
Used for convenience
URI.encode is preferered over Addressable::URI.encode as it will encode leading # character: URI.encode(‘#t#’) => %23t%23 Addressable::URI.encode(‘#t#’) => #t%23
33 34 35 36 37 |
# File 'lib/cms_scanner/web_site.rb', line 33 def url(path = nil) return @uri.to_s unless path @uri.join(URI.encode(path)).to_s end |