Skip to content

Conversation

@maxdignan
Copy link

No description provided.

parser.rb Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@text += txt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not know += worked in Ruby. Good to know!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right here you're iterating over each line of the file and appending them onto @text one at a time, but there's a method you could use to just read the whole file at once and get the same result. Check out File#read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants