Sha256: f969280daf3b4b34a7fe6cdf282ad3cc39176c3fd82dc910e1ec67c026af29ae
Contents?: true
Size: 1.01 KB
Versions: 24
Compression:
Stored size: 1.01 KB
Contents
module Browser class Location if RUBY_ENGINE == 'opal' include Native::Wrapper alias_native :hash alias_native :host alias_native :hostname alias_native :href alias_native :origin alias_native :pathname alias_native :port alias_native :protocol alias_native :search 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
24 entries across 24 versions & 1 rubygems