private Method

Generic.check_opaque(v)

There's no documentation for this item.

Source Code

# File uri/generic.rb, line 531
def check_opaque(v)
  return v unless v

  # raise if both hier and opaque are not nil, because:
  # absoluteURI   = scheme ":" ( hier_part | opaque_part )
  # hier_part     = ( net_path | abs_path ) [ "?" query ]
  if @host || @port || @user || @path  # userinfo = @user + ':' + @password
    raise InvalidURIError, 
      "can not set opaque with host, port, userinfo or path"
  elsif v && OPAQUE !~ v
    raise InvalidComponentError,
      "bad component(expected opaque component): #{v}"
  end

  return true
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.