Sha256: 551ad3afb047f717093d9191fc264637f9f922f11dabe238a6f0cb7fdc1d5af6
Contents?: true
Size: 779 Bytes
Versions: 12
Compression:
Stored size: 779 Bytes
Contents
module Browser class Location if RUBY_ENGINE == 'opal' include DelegateNative else def initialize(location_string) @location = URI(location_string) rescue @location = URI('http://localhost/') end def hash @location.hash end def host @location.host end def hostname @location.hostname end def href @location.to_s end def origin @location.origin end def pathname @location.path end def port @location.port end def protocol @location.scheme end def search @location.query end end end end
Version data entries
12 entries across 12 versions & 1 rubygems