Skip to content

Commit b67b007

Browse files
committed
Add device model information to documentation and usage examples
1 parent b4c6cc6 commit b67b007

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ SysInfo is a powerful Ring package that provides easy access to essential system
1717
## Features
1818

1919
### Core System Info
20+
- Device model
2021
- System hostname and username
2122
- OS name and kernel version
2223
- CPU model, cores, and usage metrics

docs/API.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ For more examples and detailed usage instructions, see the [Usage Guide](./Usage
2222

2323
The `SysInfo` class provides the following public methods:
2424

25+
### `model()`
26+
Retrieves the device model.
27+
- **Returns**: `String` - The device model (e.g., "MacBookPro18,1", "Surface Pro 9").
28+
2529
### `hostname()`
2630
Retrieves the system's hostname.
2731
- **Returns**: `String` - The hostname.

docs/Usage.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Now, you can use the `sys` object to call various methods to fetch system inform
1515
Here's how to get some of the most common system details:
1616

1717
```ring
18+
// Get Device Model
19+
model = sys.model()
20+
? "Device Model: " + model
21+
1822
// Get OS Information
1923
osDetails = sys.os()
2024
osName = osDetails[:name] // e.g., "Void Linux"

0 commit comments

Comments
 (0)