Skip to content

Instantly share code, notes, and snippets.

@pvgomes
Last active August 11, 2017 14:53
Show Gist options
  • Save pvgomes/c6bf858f16362d29c8711a0d447661fd to your computer and use it in GitHub Desktop.
Save pvgomes/c6bf858f16362d29c8711a0d447661fd to your computer and use it in GitHub Desktop.
RubyReadFile.rb
keys = File.readlines('keys.txt');
keys.each do |key|
puts key
end
@edsonlimadev
Copy link

If you want remove the line breaks you can use puts key.chomp

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