class method
self.parse
Ruby on Rails 1.1.0
Last seen in v1.3.0Signature
self.parse(uri)
Create a new URI::GID by parsing a gid string with argument check.
URI::GID.parse 'gid://bcx/Person/1?key=value'
This differs from URI() and URI.parse which do not check arguments.
URI('gid://bcx') # => URI::GID instance URI.parse('gid://bcx') # => URI::GID instance URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError
Parameters
-
urireq
Source
# File lib/global_id/uri/gid.rb, line 59
def parse(uri)
generic_components = URI.split(uri) << nil << true # nil parser, true arg_check
new(*generic_components)
end
Defined in lib/global_id/uri/gid.rb line 59
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in URI::GID