Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grid class #4

Merged
merged 9 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update readme with example for using sections
pacso committed Dec 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 63090b9cf2d28fc017f11a9c781ebc61a6560357
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -103,6 +103,14 @@ module Year2024
end
```

Where you have different sections of input which need to be handled differently, you can quickly split them into independent instances of `AocInput`, such as with the pussle from 2024, Day 5:

```ruby
page_rules, page_updates = aoc_input.sections
page_rules_data = page_rules.multiple_lines.columns_of_numbers("|").data
page_updates_data = page_updates.multiple_lines.columns_of_numbers(",").data
```

### Decoding printed text

```ruby