Skip to content

Instantly share code, notes, and snippets.

@fee1good
Last active March 25, 2017 11:03
Show Gist options
  • Save fee1good/9ab514101093a71c313128491471e619 to your computer and use it in GitHub Desktop.
Save fee1good/9ab514101093a71c313128491471e619 to your computer and use it in GitHub Desktop.
movie = ARGV[0] || 'movies.txt'
if !File.exist?(movie)
p 'File error'
return
end
File.readlines(movie).each do |line|
ar_line = line.split('|')
if ar_line[1].include?("Godfather")
p ar_line[1]
p '*' * ((ar_line[7].to_f - 8) * 10.0).round
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment