Class: Dommy::Internal::UrlParser::Record
- Inherits:
-
Struct
- Object
- Struct
- Dommy::Internal::UrlParser::Record
- Defined in:
- lib/dommy/internal/url_parser.rb
Overview
The spec URL record. ‘path` is an Array of segments for a hierarchical URL, or a String for an “opaque path” (cannot-be-a-base) URL. `host` is the already-serialized host string (IPv6 stored with brackets), or nil.
Instance Attribute Summary collapse
-
#fragment ⇒ Object
Returns the value of attribute fragment.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#path ⇒ Object
Returns the value of attribute path.
-
#port ⇒ Object
Returns the value of attribute port.
-
#query ⇒ Object
Returns the value of attribute query.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#fragment ⇒ Object
Returns the value of attribute fragment
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def fragment @fragment end |
#host ⇒ Object
Returns the value of attribute host
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def host @host end |
#password ⇒ Object
Returns the value of attribute password
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def password @password end |
#path ⇒ Object
Returns the value of attribute path
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def path @path end |
#port ⇒ Object
Returns the value of attribute port
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def port @port end |
#query ⇒ Object
Returns the value of attribute query
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def query @query end |
#scheme ⇒ Object
Returns the value of attribute scheme
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def scheme @scheme end |
#username ⇒ Object
Returns the value of attribute username
24 25 26 |
# File 'lib/dommy/internal/url_parser.rb', line 24 def username @username end |
Instance Method Details
#default_port ⇒ Object
28 |
# File 'lib/dommy/internal/url_parser.rb', line 28 def default_port = SPECIAL[scheme] |
#includes_credentials? ⇒ Boolean
27 |
# File 'lib/dommy/internal/url_parser.rb', line 27 def includes_credentials? = !username.to_s.empty? || !password.to_s.empty? |
#opaque_path? ⇒ Boolean
26 |
# File 'lib/dommy/internal/url_parser.rb', line 26 def opaque_path? = path.is_a?(String) |
#special? ⇒ Boolean
25 |
# File 'lib/dommy/internal/url_parser.rb', line 25 def special? = SPECIAL.key?(scheme) |