Skip to content

Commit

Permalink
Fix Idiomatic example in README.md
Browse files Browse the repository at this point in the history
Show correct usage with String and IO streams.
  • Loading branch information
myabc authored and woahdae committed Jul 10, 2024
1 parent 5eb0fa7 commit 0a9e513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SimpleXlsxReader strives to be fairly idiomatic Ruby:

```ruby
# quick example having fun w/ ruby
doc = SimpleXlsxReader.open(path_or_io)
doc = SimpleXlsxReader.open(file_path) # or SimpleXlsxReader.parse(string_or_io)
doc.sheets.first.rows.each(headers: {id: /ID/})
.with_index.with_object({}) do |(row, index), acc|
acc[row[:id]] = index
Expand Down

0 comments on commit 0a9e513

Please sign in to comment.