Skip to content

Commit

Permalink
Add the link? method section to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Oct 20, 2024
1 parent 7b8e75f commit 96054dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,19 @@ This will create the following string from the custom template:
"TTY toolkit (https://ttytoolkit.org)"
```

### link?

The `link?` method detects whether the terminal supports hyperlinks against
[supported terminals](#supported-terminals). The [link_to](#link_to) method
uses this detection to decide whether to create a hyperlink or plain text
alternative.

For example, to check the current terminal hyperlink support:

```ruby
link.link?
```

### link_to

The `link_to` method accepts two arguments, the name and the URL. The second
Expand Down

0 comments on commit 96054dc

Please sign in to comment.