String representation.
By passing False (or 0 (zero)) for any of the arguments, you can omit certain parts from being included in the string produced. This can come in handy when for example you want to sanitize away password or maybe not include any path, query or fragment.
In some cases, you will probably not want to include port 80 or 443:
my_url.to_s(port=my_url.port not in (80,443))
| Parameters: |
- scheme (bool) –
- user (bool) –
- password (bool) –
- host (bool) –
- port (bool) –
- port80 (bool) –
- path (bool) –
- query (bool) –
- fragment (bool) –
|
| Return type: | string
|
| Aliases: | to_str, __str__
|