Skip to content

Commit

Permalink
add reference/section on className() method
Browse files Browse the repository at this point in the history
  • Loading branch information
patinthehat authored and Patrick committed Feb 7, 2021
1 parent cf12acd commit 18c4486
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ See [using the package](docs/usage.md).
| `ray(…).blue()` | Output in color. Use `green`, `orange`, `red`, `blue`,`purple` or `gray` |
| `ray().clearScreen()` | Clear current screen |
| `ray().clearAll()` | Clear current and all previous screens |
| `ray().className(obj)` | Display the classname for an object |
| `ray().count(name)` | Count how many times a piece of code is called, with optional name |
| `ray().disable()` | Disable sending stuff to Ray |
| `ray().disabled()` | Check if Ray is disabled |
Expand Down
10 changes: 10 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ Ray can display information about an `Error` or exception with the `error` metho
ray().error(new Error('my error message'));
```

### Displaying class information

You can display the classname of an object with `className()`.

```js
const obj = new MyClass1();

ray().className(obj);
```

### Feature demo

Here's a sample script that demonstrates a number of the features, both basic and advanced.
Expand Down

0 comments on commit 18c4486

Please sign in to comment.