class method self.parse

Ruby on Rails 1.2.1

Last seen in v1.3.0

Available in: v1.0.1 v1.1.0 v1.2.1 v1.3.0

Signature

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

uri req
Source
# File lib/global_id/uri/gid.rb, line 64
      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 64 · View on GitHub · Improve this page · Find usages on GitHub

Defined in URI::GID

Type at least 2 characters to search.

↑↓ navigate · open · esc close